Actor

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

ShotInstancecreatablecomingPrograms

Up and coming

Run heavy work in a process of its own, so your program never freezes while it runs.

Insert an Actor in the project tree and put scripts under it: when the run starts they run in their own process, a child of the run. Both sides talk with SendMessage and BindToMessage, Roblox's Actor names. Inside, script:GetActor() gives the other end, and print and warn reach the run's output with the Actor's name in front.

Made with Instance.new("Actor") or Clone().

Properties

NameTypeDefaultDescription
Running a projectbooleanread-only
Pidnumber?

Methods

NameArgumentsReturnsDescription
SendMessage(topic: string, ...: any)()Sends values under a topic to the other side, in order; only strings, numbers, booleans, nil, buffers, attribute datatypes and tables of those can go.
BindToMessage(topic: string, callback: (...any) -> ())ShotConnectionRuns the callback for each message on that topic; the run binds what the Actor sends, the Actor's scripts what the run sends.
RestartAsync
yields
()(boolean, string?)
StopAsync
yields
(grace: number?)numberAsks it to end and kills it after grace seconds, 5 by default; returns the exit code.

Events

NamePassesDescription
Exited(number)Fires with its exit code; an error inside is reported at its .shot line like any run error, then Exited fires with 1.
From ShotInstance 33