SignalConnection:Disconnect Synchronous

Stop a single callback subscription created by Signal:Connect or Signal:Once. Other listeners on the same custom Signal continue receiving events.

Syntax
Luau
SignalConnection:Disconnect() -> ()

Parameters

Call this method with a SignalConnection receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.

This function takes no arguments.

Returns

()

No values.

Usage notes

Connected becomes false after disconnection. Calling Disconnect again is safe.

Example

Example
Luau
local changed = Signal.new()
local listener = changed:Connect(function() print("Hello") end)
listener:Disconnect()
print(listener.Connected) -- false
changed:Destroy()
Kawaii documentation