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

debug.getconstant

Returns the constant at a given index in a function's constant table.

function debug.getconstant(funcfuncfunction | numberA Luau function or stack level.: function | number, indexindexnumberNumerical index into the constant table.: number): anyanyThe constant value at index.

Usage

Read constants
local function foo()
	print("Hello, world!")
end
print(debug.getconstant(foo, 1)) --> "print"
print(debug.getconstant(foo, 3)) --> "Hello, world!"