getgenv
Accesses the executor global environment.
Syntax
Signature
getgenv() -> tableAliases
This function has no aliases.
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
table | Live executor global environment. |
Notes
Returns the executor thread's global environment when that thread belongs to the current VM. Otherwise returns the calling thread's global environment. The returned table is shared by scripts using that environment.
Example
Luau
getgenv().ExampleValue = 42
print(getgenv().ExampleValue)