getreg Synchronous

  • debug.getreg
  • debug.getregistry
  • getregistry

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.

Syntax
Luau
getreg() -> Table

Parameters

This function takes no arguments.

Returns

Table

The 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

Example
Luau
local registry = getreg()
local entries = 0
for _ in pairs(registry) do
    entries += 1
end
print("Registry entries:", entries)
Kawaii documentation