Skip to main content
Returns the script instance that defined the given Lua closure function.

Parameters

Returns

LuaSourceContainer? - The LocalScript or ModuleScript that created the closure, or nil if the closure is a C function or has no associated script.

Example

Handy when hooking functions to identify which game script is invoking specific handlers.