Returns a Luau closure that forwards every call to fn. Where newcclosure produces something that looks like a C function, newlclosure produces a genuine Luau closure, so it reports true from islclosure and carries its own proto.

Parameters

function
required
The function to wrap.

Returns

function
A Luau closure equivalent to function(...) return fn(...) end, elevated to run with Athena’s identity.

Behavior

The wrapper is compiled from a small forwarding stub and captures fn as an upvalue. Because it is a real Luau closure:

Example

Errors