getsenv
Script environment accessor (compatibility shim).
Syntax
getsenv(script: Instance) -> table
Parameters
| Parameter | Type | Description |
|---|---|---|
script | Instance | The script value used by the call. |
Returns
| Type | Description |
|---|---|
table | Table |
Description
getsenv is part of the Scripts & decompiling library. Script helpers inspect scripts in the live DataModel and can read bytecode or decompile source.
The call is read-only: it resolves the current value when invoked and does not change the underlying state.
Example
local script = getscripts()[1]
print(getsenv(script))
Notes
- Script bytecode and source are read from the live game.