Returns the Luau registry: the C-side table where the engine and executors keep references that must survive garbage collection.
Unlike the rest of the debug library, this one is only a member of the debug table. The plain global getregistry is a different function: it is an alias of getreg.

Returns

table
The registry table.

Behavior

This is the live registry, not a copy. Writing to it, or removing entries, can free objects the engine is still using and crash the client. Treat it as read-only unless you know exactly which slot you are touching.
  • It is shared. The engine, Athena, and any other script all keep references here, so expect entries you did not create.
  • Prefer getreg when you only want to look.

Example

  • getreg: the environment library’s equivalent.