Yuari
Documentation
Docs/Closures/issignalhooked

issignalhooked(signal)

Returns whether hooksignal is currently active on the signal.

Syntax

issignalhooked(signal: RBXScriptSignal) -> boolean

Parameters

ParameterTypeDescription
signalRBXScriptSignalSignal previously passed to hooksignal.

Returns

TypeDescription
booleantrue while hooksignal has replaced callbacks on the signal.

Description

issignalhooked reports whether the signal currently has callbacks replaced by hooksignal. The state is cleared by restoresignal or by re-hooking the same signal.

The check is keyed by the underlying signal object, so accessing the signal through Instance.Changed again still reports the same hook state.

Example

local value = Instance.new("NumberValue")
value.Changed:Connect(function() end)
hooksignal(value.Changed, function() return true end)
print(issignalhooked(value.Changed)) -- true
restoresignal(value.Changed)
print(issignalhooked(value.Changed)) -- false

Notes

  • Previously missing from the documentation; added alongside the real hooksignal implementation.