Signals & connectionsOverview
getconnections
Enumerates signal connection metadata.
Aliases
getfriendsDetails#
Returns Connection facades for subscriptions to an RBXScriptSignal. Fields include Enabled, ForeignState, LuaConnection and optional Function/Thread. A valid connection may expose neither reference; no Connected field is advertised by this facade. The result is subscriptions, not event history.
Fields Connection#
| Field | Type | Meaning |
|---|---|---|
Function | function | nil | Associated handler when it is available to the current environment. nil does not by itself mean the connection is invalid. |
Thread | thread | nil | Associated coroutine when available. An absent value does not by itself mean the subscription is disconnected. |
ForeignState | boolean | Whether the connection belongs to a different execution environment. It does not guarantee availability of the handler or thread references. |
LuaConnection | boolean | Whether the subscription was created through Luau. It can be true together with ForeignState; this does not guarantee a non-nil Function. |
Enabled | boolean | Reported activity state. false does not distinguish every reason for inactivity or act as a separate Connected field. |
Examples#
Example
local event = Instance.new("BindableEvent")
local ownConnection = event.Event:Connect(print)
for _, connection in ipairs(getconnections(event.Event)) do
print(connection.Enabled, connection.LuaConnection, type(connection.Function))
end
ownConnection:Disconnect()
event:Destroy()Notes#
- These are informational fields. Assigning values to fields in a returned table is not a supported way to change the underlying subscription.
- Previously obtained metadata can become stale after a subscription changes or ends. Do not treat retained references as a permanent live-state monitor.
- Connected is not a documented property of this Connection object. Do not assume that it has the same fields as an ordinary RBXScriptConnection.