Returns the script instance whose thread is currently running, or nil when the call did not originate from a game script (for example, straight from your executor thread). Inside a hook, this tells you which of the game’s scripts triggered the call.

Returns

Instance or nil
The running script, or nil if there is no game script on the stack.

Example