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.
Luau
checkcaller() -> booleanParameters
This function takes no arguments.
Returns
booleantrue 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
Luau
local function reportOrigin()
print(checkcaller() and "Called by executor code" or "Called by host code")
end
reportOrigin()