Signal:DisconnectAll Synchronous

  • KawaiiSignal:DisconnectAll
  • PsmSignal:DisconnectAll
  • VoltSignal:DisconnectAll

Disconnect every callback currently registered with this signal. Use it to reset a collection of listeners while keeping the signal itself available. Register new listeners afterward when rebuilding a UI.

Syntax
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

()

This function returns no values.

Usage notes

The signal object remains available for later listener registration.

Example

Example
Luau
local changed = Signal.new()
local old = changed:Connect(function() print("Old listener") end)
changed:DisconnectAll()
print(old.Connected) -- false
changed:Connect(function() print("New listener") end)
changed:Fire()
changed:Destroy()
Kawaii documentation