Reference API Roblox

Engine API

Website

Related

Reference API Roblox

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.

This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service]

Member index 14

HistoryMember
688ExecuteCommand(code: string, args: Tuple): ExecutedRemoteCommand
688ExecuteCommandAsync(code: string, args: Tuple): Tuple
688GetExecutingPlayer(): Player
688GetReceivedUpdateSignal(): RBXScriptSignal
688GetStoppingSignal(): RBXScriptSignal
688SendUpdate(args: Tuple): null
inherited from Instance
731Archivable: bool
731Capabilities: SecurityCapabilities
731IsInSandbox: bool
731Name: string
731Parent: Instance
731PredictionMode: PredictionMode
731Sandboxed: bool
731UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
707GetDescendants(): Instances
486GetFullName(): string
706GetStyled(name: string, selector: string?): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
698QueryDescendants(selector: string): Instances
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
731children(): Instances
731clone(): Instance
731destroy(): null
731findFirstChild(name: string, recursive: bool = false): Instance
731getChildren(): Instances
731isDescendantOf(ancestor: Instance): bool
731remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
731childAdded(child: Instance)
inherited from Object
731ClassName: string
731className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
731isA(className: string): bool
647Changed(property: string)

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

Members 14

ExecuteCommand

Parameters (2)
codestring
argsTuple
Returns (1)
ExecutedRemoteCommand

History 1

ExecuteCommandAsync

Parameters (2)
codestring
argsTuple
Returns (1)
Tuple
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

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.

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.

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.

History 1

SendUpdate

Parameters (1)
argsTuple
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.

History 1

Settings