Instances
RemoteEvent
One-way communication between creator LocalScripts and ServerScripts.
Members
| Name | Type | Description |
|---|---|---|
MaxRequestsPerMinute | number | Maximum events accepted per minute per Player. 0 disables the limit. |
Reliability | Enum.NetworkReliability | Reliable keeps ordered delivery. Unreliable may discard an older pending packet when a newer packet for the same remote and target replaces it. |
Payload | Enum.RemotePayload | Default permits every supported remote value type. Custom enforces AllowedPayloadTypes. |
AllowedPayloadTypes | array | Saved list of payload types allowed when Payload is Custom. Studio displays this list as checkboxes. |
Timeout | number | Native timeout in seconds. RemoteEvents do not wait for a response, so this mainly applies to RemoteFunction requests using the same remote configuration system. |
NetworkPriority | Enum.NetworkPriority | Ranks queued remote traffic as High, Medium, Default, or Low. |
FireServer(...) | LocalScript | Sends values from the current client to the authoritative server. |
OnServerEvent | ServerScript signal | Fires on the server. The first callback argument is the Player that sent the event. |
FireClient(player, ...) | ServerScript | Sends values to one Player's client. |
FireAllClients(...) | ServerScript | Sends values to all connected clients. |
OnClientEvent | LocalScript signal | Fires when the server sends this RemoteEvent to the local client. |
Example: client to server
Luau
-- LocalScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local event = ReplicatedStorage:WaitForChild("ActionEvent")
event:FireServer("JumpButton")Luau
-- ServerScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local event = ReplicatedStorage:WaitForChild("ActionEvent")
event.OnServerEvent:Connect(function(player, action)
print(player.Name, action)
end)Example: server to clients
Luau
-- ServerScript
event:FireClient(player, "RoundStarted")
event:FireAllClients("WeatherChanged", "Rain")Luau
-- LocalScript
event.OnClientEvent:Connect(function(kind, value)
print(kind, value)
end)Network configuration
Luau
-- ServerScript runtime configuration
event.MaxRequestsPerMinute = 120
event.Reliability = Enum.NetworkReliability.Unreliable
event.Payload = Enum.RemotePayload.Custom
event.AllowedPayloadTypes = { "Number", "Vector3", "Player" }
event.NetworkPriority = Enum.NetworkPriority.HighWhen Payload is Custom, Studio shows checkboxes for Nil, Boolean, Number, String, Vector3, Color3, Instance, Player, and Table. The checked values are persisted as the AllowedPayloadTypes array in the place.
MaxRequestsPerMinute is tracked per Player and per direction. A value of 0 means unlimited.Arguments
Remote messages support nil, booleans, numbers, strings, Vector3, Color3/Colour3, Instances, Players and nested tables containing supported values. Custom payload rules are checked while encoding and decoding remote packets.
Use RemoteEvents for notifications and actions that do not need an immediate return value. ServerScripts should validate client-supplied values before using them as authoritative game state.