The Connection object
Last updated
Last updated
A new Connection
object represents an active link to a signal's callback. These are returned by and allow inspection and manipulation over connections / signals.
Enabled
boolean
Whether the connection is currently active and will respond to events.
ForeignState
boolean
true
if the connection was made from a foreign Lua state (e.g CoreScript)
LuaConnection
boolean
true
if the connection was created from Luau, not C or foreign code.
Function
(...any) -> (...any)?
The bound function, or nil
in foreign or non-Luau contexts.
Thread
thread?
The thread that created the connection, or nil
in foreign or non-Luau contexts
Connection
:
Fire
(...: any): ()
Fires the connected function with the given arguments.
Connection
:
Defer
(...: any): ()
Connection
:
Disconnect
(): ()
Disconnects the connection from the signal.
Connections
:
Disable
(): ()
Prevents the connection from receiving events.
Connection
:
Enable
(): ()
Re-enables a previously disabled connection.
Defers execution using