Lua states
State proxies, state discovery, and thread execution.
Functions
getactorstatesList proxies for currently active Actor Luau states. Use each proxy’s GetActors method to see which Instances it represents.
getgamestateGet a proxy for the active game Luau state. Use it when you need to distinguish the main game state from Actor states.
getluastateResolve the Luau state associated with an Actor or script Instance. With no argument, it resolves the current state instead.
isparallelReport whether the current Luau execution is in a parallel phase. Check it before choosing work that depends on the current scheduler context.
LuaStateProxy:ExecuteRun Luau source in the state represented by this proxy. Pass simple values or Instances when the target code needs context from the caller.
LuaStateProxy:GetActorsList the Actors associated with this proxy’s state. It helps you tell which Actor instances share the state before choosing a target.
LuaStateProxy.newGet 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.
run_on_threadRun source in the state associated with a thread proxy from getactorthreads. This is useful when you already selected a state by its published thread proxy.