Skip to main content
Returns the script that called the current function, or nil when called directly from the executor’s main thread.
Used inside hookfunction() or signal callbacks to find which script triggered the call. If you only need to know whether the caller was your script or a Roblox-side one, use checkcaller() instead.

Returns

LuaSourceContainer? - the Roblox script that called the function.
nil when called directly from the executor’s main thread.

Example

Always check parameters and return values when working with this library function.