restorefunction
Undoes a hook applied with hookfunction or hookmetamethod and restores the original implementation.
Signature
restorefunction(fn: (...any) -> ...any): ()Parameters
fnfunctionThe hooked function to restore.
Returns
Nothing.
Example
local original = print
hookfunction(print, function() end)
print("this prints nothing")
restorefunction(print)
print("this prints again", print == original)