debug.getconstants
Returns the full constant table of a function.
function debug.getconstants(funcfuncfunction | numberA Luau function or stack level.: function | number): {any}{any}Sparse table of constants.Usage
Dump constants
local function foo()
local num = 5000 .. 50000
print("Hello, world!", num, warn)
end
for i, v in pairs(debug.getconstants(foo)) do
print(i, v)
end