Actor
Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.
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
| Name | Type | Default | Description |
|---|---|---|---|
| Running a project | boolean | read-only | |
| Pid | number? |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| 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) -> ()) | ShotConnection | Runs 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?) | number | Asks it to end and kills it after grace seconds, 5 by default; returns the exit code. |
Events
| Name | Passes | Description |
|---|---|---|
| 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
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
