getgamestate
Returns a proxy for the Roblox main state.
Syntax
getgamestate() -> table
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
table | A proxy for the Roblox main state |
Description
getgamestate is part of the Lua states library. Lua state proxies wrap a specific Luau state and forward execution or inspection to threads running in that state.
The call is read-only: it resolves the current value when invoked and does not change the underlying state.
Example
local state = getgamestate()
print(state:IsActorState())
Notes
- Cross-state execution follows the target state's scheduler and thread rules.