state:Execute
Schedules source through a state proxy.
Syntax
state:Execute(source: string, ...: any) -> ()
Parameters
| Parameter | Type | Description |
|---|---|---|
source | string | Luau chunk to compile. |
... | any | Supported values supplied to the chunk. |
Description
For the main game state this compiles and schedules a local task. For an Actor state it uses an eligible observed Actor as the submission target. Arguments become chunk varargs; results are not returned to the caller. An expired proxy or unavailable Actor produces an error instead of silently choosing an unrelated state.
Example
getgamestate():Execute("local message = ...; print(message)", "hello")
These are Game executor contracts. Check build requirements and session lifetimes before using them.
