Environment

The Environment library provides functions for accessing and manipulating the Luau environment, including garbage collection inspection and global environments.

Overview

These functions allow you to:

  • Access different global environments
  • Inspect the garbage collector
  • Filter and find objects in memory

Available Functions

FunctionDescription
filtergcFilter garbage collected objects
getallthreadsGet GC-visible Luau threads
getgcGet all objects tracked by garbage collector
getgenvGet Volt's global environment
getregGet the Luau registry
getrenvGet the game's global environment
gettenvGet a thread's environment

Environment Types

Volt Environment (genv)

The global environment where your scripts run. Variables defined here persist across script executions.

Game Environment (renv)

The game's Luau environment containing globals such as game and workspace.

Registry

The Luau registry is a special table used internally by the Luau implementation to store references.