Reference API Roblox

Engine API

Website

Related

Reference API Roblox

RemoteEvent

An object which facilitates asynchronous, one-way communication across the client-server boundary. Scripts firing a RemoteEvent do not yield.

Member index 6

HistoryMember
573FireAllClients(arguments: Tuple): null
573FireClient(player: Player, arguments: Tuple): null
573FireServer(arguments: Tuple): null
462OnClientEvent(arguments: Tuple)
483OnServerEvent(player: Player, arguments: Tuple)
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: 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
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

The RemoteEvent object facilitates asynchronous, one-way communication across the client-server boundary without yielding for a response. This communication can be directed from one client to the server, from the server to a specific client, or from the server to all clients.

In order for both the server and clients to access a RemoteEvent instance, it must be in a place where both sides can see it, such as ReplicatedStorage, although in some cases it's appropriate to store it in Workspace or inside a Tool.

If you need the result of the call, you should use a RemoteFunction instead. Otherwise a remote event is recommended since it will minimize network traffic/latency and won't yield the script to wait for a response.

See Remote Events and Callbacks for code samples and further details on RemoteEvent.

Parameter Limitations

Any type of Roblox object such as an Enum, Instance, or others can be passed as a parameter when a RemoteEvent is fired, as well as Luau types such as numbers, strings, and booleans, although you should carefully explore the limitations.

History 18

Members 6

FireAllClients

Parameters (1)
argumentsTuple
Returns (1)
null

Fires the OnClientEvent event for each client connected to the same RemoteEvent. Unlike FireClient(), this event does not take a target Player as the first argument, since it fires to multiple clients. Since this method is used to communicate from the server to clients, it will only work when used in a Script.

Any type of Roblox object such as an Enum, Instance, or others can be passed as a parameter to FireAllClients(), as well as Luau types such as numbers, strings, and booleans, although you should carefully explore the limitations.

See Remote Events and Callbacks for code samples and further details on RemoteEvent.

History 3

FireClient

Parameters (2)
playerPlayer
argumentsTuple
Returns (1)
null

Fires the OnClientEvent event for one connected client specified by the required Player argument. Since this method is used to communicate from the server to a client, it will only work when used in a Script.

Any type of Roblox object such as an Enum, Instance, or others can be passed as a parameter to FireClient(), as well as Luau types such as numbers, strings, and booleans, although you should carefully explore the limitations.

See Remote Events and Callbacks for code samples and further details on RemoteEvent. See also FireAllClients() which works similarly but fires the event for each client connected to the same RemoteEvent.

History 4

FireServer

Parameters (1)
argumentsTuple
Returns (1)
null

Fires the OnServerEvent event on the server from one client. Connected events receive the Player argument of the firing client. Since this method is used to communicate from a client to the server, it will only work when used in a LocalScript.

Any type of Roblox object such as an Enum, Instance, or others can be passed as a parameter to FireServer(), as well as Luau types such as numbers, strings, and booleans, although you should carefully explore the limitations.

See Remote Events and Callbacks for code samples and further details on RemoteEvent.

History 3

OnClientEvent

Parameters (1)
argumentsTuple

Fires from a LocalScript when either FireClient() or FireAllClients() is called on the same RemoteEvent instance from a Script.

See Remote Events and Callbacks for code samples and further details on OnClientEvent.

History 2

OnServerEvent

Parameters (2)
playerPlayer
argumentsTuple

Fires from a Script when FireServer() is called on the same RemoteEvent instance from a LocalScript.

See Remote Events and Callbacks for code samples and further details on OnServerEvent.

History 3

Settings