checkcaller Synchronous

Ask whether the current call came from executor-owned code. This is useful in a diagnostic callback that may be reached by both your script and the host.

Syntax
Luau
checkcaller() -> boolean

Parameters

This function takes no arguments.

Returns

boolean

true for an executor caller; false otherwise.

Usage notes

Call it inside the callback you are diagnosing. A result captured elsewhere says nothing about a later call.

Example

Example
Luau
local function reportOrigin()
    print(checkcaller() and "Called by executor code" or "Called by host code")
end
reportOrigin()
Kawaii documentation