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

debug.getupvalue

Returns an upvalue at a given index in a function.

function debug.getupvalue(funcfuncfunction | numberA Luau function or stack level.: function | number, indexindexnumberIndex of the upvalue.: number): anyanyThe upvalue at index.

Usage

Read an upvalue
local upvalue = function() end
local function foo()
	print(upvalue)
end
print(debug.getupvalue(foo, 1)) --> upvalue (function)