Functions & closuresReference
restoresignal
Represents restoration of signal callback behavior.
Details#
Removes the module's hook from a signal and restores saved handler behavior. Pass the same signal used for hooksignal; disconnecting an individual connection is a different operation.
Signature#
restoresignal(signal: RBXScriptSignal): booleanParameters#
| Parameter | Type | Description |
|---|---|---|
signal | RBXScriptSignal | Engine signal, not a connection or local Signal facade. |
Returns#
true when a saved signal interception was removed, otherwise false.
Examples#
Example
local event = Instance.new("BindableEvent")
local connection = event.Event:Connect(function(value) print(value) end)
hooksignal(event.Event, function(metadata, value) return true, value end)
print(restoresignal(event.Event))
event:Fire("restored")
task.defer(function() connection:Disconnect(); event:Destroy() end)