Forest Logo
search
package_2

perfectsignal

By @coffilhg

Roblox

Mirrored

PerfectSignal (GoodSignal)

The same as GoodSignal, just with a complete type definition and a fix of an error in Signal:Wait found by Crusherfire This module will most probably never be updated - it seems perfect. A Roblox Lua Signal implementation that has full API and behavioral parity with Roblox' RBXScriptSignal type.

Available Here!

  • This repository ~ src/init.luau
  • Wally
    PerfectSignal = "coffilhg/perfectsignal@1.0.1"
    
  • Rotriever
    PerfectSignal = "github.com/Coffilhg/PerfectSignal@1.0.1"
    

Full API

-- Create
local sig = Signal.new()

-- Connect and Fire
local connection = sig:Connect(function(arg1, arg2) ... end)
sig:Fire(param1, param2)

-- Wait on Fire
local param1, param2 = sig:Wait()

-- Disconnect
connection:Disconnect()
sig:DisconnectAll()

No Memory Leaks!

GoodSignal is implemented in pure Lua (using the task library, rather than internally using a BindableEvent), so it does not suffer from memory leaks. Even if you don't Disconnect all of the connections on a GoodSignal, everything will still be GCed normally.

Package Details

Install command (Click to copy)


Version

1.0.1

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.