Skip to content
Saiko

isexecutorclosure

Returns true when the function was created by the executor rather than by the game.

Signature

luau
isexecutorclosure(fn: (...any) -> ...any): boolean

Parameters

fnfunction

The function to test.

Returns

boolean

Example

luau
print(isexecutorclosure(print)) --> false
print(isexecutorclosure(function() end)) --> true (this script came from the executor)