# RemoteCommandService

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Service
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/RemoteCommandService/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/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.

## Methods

### ExecuteCommand

```luau
RemoteCommandService:ExecuteCommand(code: string, ...: any): ExecutedRemoteCommand
```

- Tags: Roblox script security

### ExecuteCommandAsync

```luau
RemoteCommandService:ExecuteCommandAsync(code: string, ...: any): ...any
```

- Tags: Yields, Roblox script security

### GetExecutingPlayer

```luau
RemoteCommandService:GetExecutingPlayer(): Player
```

- Tags: Capabilities: RemoteCommand

Returns the [`Player`](https://rapi.sleaze.dev/classes/Player.md) for the Studio collaborator who started the command that is currently executing.

Returns: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) representing the collaborator who started the running command, or `nil` if no connected player matches.

### GetReceivedUpdateSignal

```luau
RemoteCommandService:GetReceivedUpdateSignal(): RBXScriptSignal
```

- Tags: Capabilities: RemoteCommand

Returns a signal that fires on the server each time the Studio client that started the command sends it an update.

Returns: An event that fires with the values the initiating Studio client passes each time it sends an update to the running command.

### GetStoppingSignal

```luau
RemoteCommandService:GetStoppingSignal(): RBXScriptSignal
```

- Tags: Capabilities: RemoteCommand

Returns a signal that fires on the server when the command that is currently executing is being stopped.

Returns: An event that fires, with no arguments, when the running command is stopped.

### SendUpdate

```luau
RemoteCommandService:SendUpdate(...: any)
```

- Tags: Capabilities: RemoteCommand

Sends a set of values from the running command back to the Studio client that started it.

Parameters:

- `args`: The values to deliver to the initiating Studio client.

## Events

### CommandSentFromStudio

```luau
RemoteCommandService.CommandSentFromStudio: RBXScriptSignal<(commandId: number, code: string, ...: any)>
```

- Tags: Hidden, Roblox engine security

### OneshotCommandErrorFromRcc

```luau
RemoteCommandService.OneshotCommandErrorFromRcc: RBXScriptSignal<(commandId: number, error: string)>
```

- Tags: Hidden, Roblox engine security

### OneshotCommandResultFromRcc

```luau
RemoteCommandService.OneshotCommandResultFromRcc: RBXScriptSignal<(commandId: number, ...: any)>
```

- Tags: Hidden, Roblox engine security

### OneshotCommandSentFromStudio

```luau
RemoteCommandService.OneshotCommandSentFromStudio: RBXScriptSignal<(commandId: number, code: string, ...: any)>
```

- Tags: Hidden, Roblox engine security

### StandardOutMessageFromRcc

```luau
RemoteCommandService.StandardOutMessageFromRcc: RBXScriptSignal<(messageType: Enum.MessageType, message: string)>
```

- Tags: Hidden, Roblox engine security

### StopSentFromStudio

```luau
RemoteCommandService.StopSentFromStudio: RBXScriptSignal<(commandId: number)>
```

- Tags: Hidden, Roblox engine security

### UpdateSentFromRcc

```luau
RemoteCommandService.UpdateSentFromRcc: RBXScriptSignal<(commandId: number, ...: any)>
```

- Tags: Hidden, Roblox engine security

### UpdateSentFromStudio

```luau
RemoteCommandService.UpdateSentFromStudio: RBXScriptSignal<(commandId: number, ...: any)>
```

- Tags: Hidden, Roblox engine security

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
