Syntax
getrenv(): tableReturns
| Name | Type | Description |
|---|---|---|
environment | table | Environment table for the selected context. |
Description
Returns the Roblox environment table.
Call it without parameters. The function reads the needed context from the current runtime state.
It returns environment (table). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = getrenv()
print(result)