Tells you whether a function is a newcclosure-wrapped C closure.
Most commonly used to filter getgc() or filtergc() output down to wrapped Luau functions - the hooks and disguises another script left behind.
A C function made by roblox and a newcclosure-wrapped one both return true from iscclosure. isnewcclosure is the only built-in predicate that separates the two.
Parameters
Returns
true if func was produced by newcclosure, false otherwise. A plain Luau function, a real Roblox C function like print, and the executor’s own C closures all return false.
Example
Used to verify if a C function is native or a wrapped Lua function.