Skip to content
Signals & connectionsOverview

getconnections

Enumerates signal connection metadata.

Aliasesgetfriends

Details#

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#

FieldTypeMeaning
Functionfunction | nilAssociated handler when it is available to the current environment. nil does not by itself mean the connection is invalid.
Threadthread | nilAssociated coroutine when available. An absent value does not by itself mean the subscription is disconnected.
ForeignStatebooleanWhether the connection belongs to a different execution environment. It does not guarantee availability of the handler or thread references.
LuaConnectionbooleanWhether the subscription was created through Luau. It can be true together with ForeignState; this does not guarantee a non-nil Function.
EnabledbooleanReported activity state. false does not distinguish every reason for inactivity or act as a separate Connected field.

Examples#

Example

Luau
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.