issignalhooked Synchronous
Check whether hooksignal currently intercepts a Roblox event. It is useful before replacing a hook or during cleanup when several scripts may touch the same signal.
Luau
issignalhooked(signal: RBXScriptSignal) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
signal | RBXScriptSignal | RBXScriptSignal to check. |
Returns
booleantrue if the signal has an active hook; false otherwise.
Usage notes
The check uses the underlying signal identity, so a newly obtained wrapper reports the same state. Passing something other than an RBXScriptSignal raises an error.
Example
Luau
local event = Instance.new("BindableEvent")
print(issignalhooked(event.Event)) -- false
hooksignal(event.Event, function()
return true
end)
print(issignalhooked(event.Event)) -- true
restoresignal(event.Event)
print(issignalhooked(event.Event)) -- false
event:Destroy()