Signal: DisconnectAll Synchronous
KawaiiSignal:DisconnectAllPsmSignal:DisconnectAllVoltSignal:DisconnectAll
Remove every callback subscription from a custom Signal while keeping the Signal available for new listeners.
Luau
Signal:DisconnectAll() -> ()Parameters
Call this method with a Signal receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
This function takes no arguments.
Returns
()No values.
Usage notes
This also marks existing SignalConnection objects disconnected. Waiters registered through Wait are separate and remain pending for the next Fire.
Example
Luau
local changed = Signal.new()
changed:Connect(function() print("Old callback") end)
changed:DisconnectAll()
changed:Connect(function() print("New callback") end)
changed:Fire()
changed:Destroy()