Yuari
Documentation
Docs/Environment/getscriptglobals

getscriptglobals

Returns the current script globals together with the shared table.

Syntax

getscriptglobals() -> table

Parameters

This function takes no parameters.

Returns

TypeDescription
tableThe current script globals together with the shared table

Description

getscriptglobals is part of the Environment library. Environment helpers return or inspect the global, game and script environments used by the executor and the client.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

Example

local globals = getscriptglobals()
print(globals._G == getgenv())

Notes

  • Mutating a returned environment affects every script that shares it.