Skip to content
Saiko

checkcaller

Returns true when the current thread was created by the executor rather than by the game. Use it inside a hook to tell your own calls apart from the game's.

Signature

luau
checkcaller(): boolean

Returns

boolean

Example

luau
local old
old = hookmetamethod(game, "__index", function(self, key)
    if not checkcaller() and key == "Health" then
        return 100
    end
    return old(self, key)
end)