getrenv
Returns the game's global environment, separate from the executor's. Reading it shows the globals game scripts actually see.
Signature
getrenv(): { [any]: any }Returns
table
Example
-- the game's environment, not yours
local env = getrenv()
print(env.print == print) --> usually false: the game has its own copy
env.shared.fromExecutor = true
print(shared.fromExecutor) --> nil, `shared` here is yours