Yuari
Documentation
Docs/Lua states/getluastate

getluastate

Returns a proxy for the current executor state.

Syntax

getluastate() -> table

Parameters

This function takes no parameters.

Returns

TypeDescription
tableA proxy for the current executor state

Description

getluastate 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 = getluastate()
state:Execute("print('hello from the executor state')")

Notes

  • Cross-state execution follows the target state's scheduler and thread rules.