RemoteCommandService
Team Create service that executes Luau commands sent from a Studio client on the collaborative editing server and relays their output back to that client.
| Memory category | Instances |
|---|
Member index 14
Description
Studio-only Team Create service; not accessible from experience scripts. Powers remote command execution: a Studio client submits Luau source, which the collaborative editing server runs inside a dedicated sandboxed thread, streaming the command's output and errors back to the client that started it.
Commands take one of two forms: a persistent command that opens a two-way channel between the client and the running code, and a one-shot command that runs once and hands back a single result or error.
While a persistent command runs, its server-side code communicates with the originating client through the members on this service: SendUpdate() pushes values to the client, GetReceivedUpdateSignal() delivers values the client sends back, GetStoppingSignal() fires when the command is stopped, and GetExecutingPlayer() identifies the collaborator who started it.
History 31
- 731 Add
- 731 Add
- 731 Add
- 731 Add
- 731 Add
- 731 Add
- 731 Add
- 731 Add
- 726 Remove
- 726 Remove
- 726 Remove
- 726 Remove
- 726 Remove
- 726 Remove
- 726 Remove
- 726 Remove
- 688 Add
- 688 Add
- 688 Add
- 688 Add
- 688 Add
- 688 Add
- 688 Add
- 688 Add
- 688 Add SendUpdate
- 688 Add GetStoppingSignal
- 688 Add GetReceivedUpdateSignal
- 688 Add GetExecutingPlayer
- 688 Add ExecuteCommandAsync
- 688 Add ExecuteCommand
- 688 Add RemoteCommandService
Members 14
ExecuteCommand
| Parameters (2) | ||
|---|---|---|
| code | string | |
| args | Tuple | |
| Returns (1) | ||
| ExecutedRemoteCommand | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
- 688 Add ExecuteCommand
ExecuteCommandAsync
| Parameters (2) | ||
|---|---|---|
| code | string | |
| args | Tuple | |
| Returns (1) | ||
| Tuple | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
GetExecutingPlayer
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Player | ||
Call this from inside a running command on the collaborative editing
server to find the Player that represents the collaborator who
submitted it. The server compares the command's originating network
address against the connected players and returns the matching
Player, or nil when no player matches.
This method may only be called from within an active persistent command, and raises an error if there is no such command, such as when called from a one-shot command or after the command has stopped.
| Thread safety | Unsafe |
|---|
History 1
GetReceivedUpdateSignal
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| RBXScriptSignal | ||
Server-side command code connects to this signal to receive data pushed from the Studio client that started the command. The event fires with the tuple of values the client sends, forming the client-to-server half of the command's two-way channel.
This method may only be called from within an active persistent command, and raises an error if there is no such command, such as when called from a one-shot command or after the command has stopped.
| Thread safety | Unsafe |
|---|
History 1
GetStoppingSignal
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| RBXScriptSignal | ||
Server-side command code connects to this signal to learn when its command is being stopped, giving it a chance to clean up before the sandboxed thread is torn down. The event fires when the initiating Studio client stops the command, or when that collaborator disconnects from the Team Create session.
This method may only be called from within an active persistent command, and raises an error if there is no such command, such as when called from a one-shot command or after the command has stopped.
| Thread safety | Unsafe |
|---|
History 1
- 688 Add GetStoppingSignal
SendUpdate
| Parameters (1) | ||
|---|---|---|
| args | Tuple | |
| Returns (1) | ||
| null | ||
Server-side command code calls this to push values to the Studio client that started the command, forming the server-to-client half of the command's two-way channel; the values reach that client through the command's update event.
This method may only be called from within an active persistent command. When there is no such command, such as when called from a one-shot command or after the command has stopped, the call has no effect.
| Thread safety | Unsafe |
|---|
History 1
- 688 Add SendUpdate