Returns the inner function at index inside a Luau function.
When you want an inner function you can call, use activated true and take the first entry: debug.getproto(f, i, true)[1]. This is the reliable way to get a callable proto.
Parameters
Returns
With activated left out or false, returns the single proto function sitting at index.
With activated set to true, returns a table of that proto’s closures. Index it with [1] to get an inner function you can call straight away.
Aliases
Example
When you want an inner function you can call, use activated true and take the first entry: debug.getproto(f, i, true)[1]. This is the reliable way to get a callable proto.