Puts a hooked prototype back to its original body.

Parameters

function
required
A Luau function, or a proto handle from getproto.

Behavior

  • Restoring an unhooked prototype raises, so guard with isprotohooked if you are not sure.
  • Live frames are handled. A closure part-way through the hook body is moved onto the carrier so it finishes in the hook’s code rather than jumping into the restored original.

Example

Errors