Yuari
Documentation
Docs/Signals/getconnection

getconnection

Returns one connection descriptor, including LuaConnection metadata, by 1-based index.

Syntax

getconnection(signal: RBXScriptSignal, index: number) -> table?

Parameters

ParameterTypeDescription
signalRBXScriptSignalThe RBXScriptSignal to inspect or act on.
indexnumberA one-based index.

Returns

TypeDescription
table?The connection descriptor at the requested index, or nil when it does not exist.

Description

getconnection returns one descriptor from the same live connection list used by getconnections. Indices are one-based.

The descriptor includes Connected, Enabled, ForeignState, LuaConnection, Function and Thread, plus Fire, Defer, Disable, Enable and Disconnect. LuaConnection distinguishes Luau callbacks and waiting coroutines from native connections.

Example

print(getconnection(workspace.ChildAdded, 1))

Notes

  • Signal helpers operate on the live RBXScriptSignal and its connection list.
  • The index must be greater than zero.
  • An out-of-range index returns nil.
  • Disconnected and disabled connections are not returned.