VINDICTA.TOP
Debug · Library
Bunni.fun
ChocoSploit
Cryptic
Potassium
Seliware
SirHurt
Solara
Velocity
Volcano
Volt
Wave
Xeno

debug.getproto

Returns the proto (inner function) at a given index of a function.

function debug.getproto(funcfuncfunction | numberA Luau function or stack level.: function | number, indexindexnumberIndex of the inner proto.: number, activeactiveboolean?If true, returns active closures instead.: boolean?): function | {function}function | {function}The proto function, or list of active closures.

Usage

Call an inner function
local function myFunction()
	local function proto()
		print("Hello, world!")
	end
end
local proto = debug.getproto(myFunction, 1, true)[1]
proto() --> Hello, world!