Returns a single connection from signal. A shorthand for indexing getconnections.

Parameters

RBXScriptSignal
required
The signal to read.
number
default:"1"
Which connection to take, from 1.

Returns

Connection | nil
The connection wrapper, or nil if the signal has no connection at that index.

Behavior

  • Out of range gives nil, not an error, so it is safe to probe.
  • The wrapper is the same object getconnections returns, with the same fields and methods.

Example