Destroy are always C closures, so a Luau result means the object is a fake.
Parameters
Returns
true if func is a C closure, false if it’s a Luau closure.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
iscclosure(func: function): boolean
Destroy are always C closures, so a Luau result means the object is a fake.
local function analyzeObject(obj)
if type(obj.Destroy) == "function" then
if iscclosure(obj.Destroy) then
print("this is a raw roblox instance")
-- interacting directly with the engine
else
print("this is a lua proxy/wrapper table")
-- the game is intercepting this call
end
end
end
| Parameter | Type | Description |
|---|---|---|
func | function | The function to check. |
true if func is a C closure, false if it’s a Luau closure.
local function luaFn() end
local cFn = newcclosure(luaFn)
print(iscclosure(print)) -- true, engine C closure
print(iscclosure(cFn)) -- true, wrapped into a C closure
print(iscclosure(luaFn)) -- false, plain Luau function
local function analyzeObject(obj)
if type(obj.Destroy) == "function" then
if iscclosure(obj.Destroy) then
print("this is a raw roblox instance")
-- interacting directly with the engine
else
print("this is a lua proxy/wrapper table")
-- the game is intercepting this call
end
end
end