Actors
Run code inside actors, talk to them, and tell serial threads from parallel ones. Entries: 5.
- create_comm_channelCreates a communication channel between the main state and actor states. Returns its numeric id and an event object: the main state listens on .Event and an actor fires into it after looking the channel up by id.
(number, BindableEvent) - get_comm_channelReturns the event object of a channel made with create_comm_channel, or nil when no channel has that id. Call it from inside an actor to reach the channel the main state listens on.
BindableEvent? - getactorsReturns the Actor instances the game has. Pass one to run_on_actor to run code in its state.
{ Actor } - isparallelReturns true when the current thread is running in parallel (desynchronized) and false when it is running serially.
boolean - run_on_actorRuns a Luau source string in the given actor's own state. Every argument after the source is passed to the script and reaches it as ... .
()