LuaStateProxy.new Synchronous

Get a proxy for the Luau state currently associated with this call. The proxy gives you a stable handle for checking its Actors or executing source in that state.

Syntax
Luau
LuaStateProxy.new() -> LuaStateProxy

Parameters

This function takes no arguments.

Returns

LuaStateProxy

A LuaStateProxy with Id, IsActorState, Event, GetActors, and Execute members.

LuaStateProxy fields
Luau
LuaStateProxy = {Id: number, IsActorState: boolean, Event: NativeSignal}

Example

Example
Luau
local state = LuaStateProxy.new()
print("Actor state:", state.IsActorState)
print("Actors here:", #state:GetActors())
Kawaii documentation