Skip to main content
Returns the Luau registry - the table the VM keeps its internal references and loaded libraries in.
The same table object comes back on every call. Its direct contents are the VM’s live internal references (threads, functions, userdata) plus _LOADED - every library and module required this session. The threads sitting in here are what getscriptfromthread walks to map a thread back to its owning script.

Returns

table - the live registry. The same object is returned on every call.

Aliases

  • getreg
  • getregistry

Example

In a Roblox game, list every library and module the Luau VM has loaded so far this session.
Use caution when modifying registry values, as it can cause instability in the Lua VM.