getsignal Synchronous

Read one event from the same sorted list returned by getsignals. This is handy when you are browsing an Instance’s events by index in a small inspection tool.

Syntax
Luau
getsignal(instance: Instance, index: number) -> RBXScriptSignal?

Parameters

Function parameters
ParameterTypeDescription
instanceInstanceInstance whose events will be enumerated.
indexnumberPositive, one-based integer in the getsignals result.

Returns

RBXScriptSignal?

An RBXScriptSignal at the requested position, or nil when that position is beyond the list.

Usage notes

The list is rebuilt on each call. An invalid index raises an error. Use getsignals when you need to inspect several events at once.

Example

Example
Luau
local part = Instance.new("Part")
local events = getsignals(part)
if #events > 0 then
    print(getsignal(part, 1))
end
part:Destroy()
Kawaii documentation