getreg Synchronous
debug.getregdebug.getregistrygetregistry
Inspect the Luau registry for the current VM. The registry holds runtime-owned references that ordinary globals do not expose; it is most useful while diagnosing a missing reference.
Luau
getreg() -> TableParameters
This function takes no arguments.
Returns
TableThe live Luau registry table.
Usage notes
The registry is shared runtime state. Prefer inspection over editing it, and do not assume its keys remain the same across builds.
Example
Luau
local registry = getreg()
local entries = 0
for _ in pairs(registry) do
entries += 1
end
print("Registry entries:", entries)