Hi Creators!
We are excited to announce the release of UnreliableRemoteEvents! This is available immediately and adds a new creatable instance, UnreliableRemoteEvent
, that sends the event unreliably and unordered through the network. This is in contrast to RemoteEvents which are sent reliably and ordered.
UnreliableRemoteEvents are useful for implementing ephemeral events. Examples include particle effects, sound bites, and events that impact visuals but are not crucial for game state.
Usage:
This new instance shares the same methods, events, and properties as RemoteEvents but with a different network guarantee.
That is, you can:
- Create them in a script by calling āInstance.new(āUnreliableRemoteEvent)ā and connect to them like you would with RemoteEvents. Here is a simple script example:
--Server
local unreliableEvent = Instance.new("UnreliableRemoteEvent")
unreliableEvent.Name = "UnreliableEvent"
unreliableEvent.Parent = workspace
while true do
unreliableEvent:FireAllClients()
task.wait(1)
end
--Client
local unreliableEvent = workspace:WaitForChild("UnreliableEvent")
local function onClientMsgEvent()
print('Received UnreliableRemoteEvent from Server!')
end
unreliableEvent.OnClientEvent:Connect(onClientMsgEvent)
- Add the instance via the Studio Explorer drop down menu:
There are a couple of things to keep in mind when using UnreliableRemoteEvents:
-
There is no ordering guarantee between UnreliableRemoteEvents and anything else. UnreliableRemoteEvents may be processed in a different order than they were sent.
-
UnreliableRemoteEvents may be dropped to prioritize bandwidth or CPU usage in addition to any loss that occurs over the network.
Known Issues
-
UnreliableRemoteEvent payloads should be at most 900 bytes. Events with a larger payload will be dropped. When this happens in RobloxStudio, we will output a log message in the output menu indicating how many bytes the event has gone over. Unfortunately, this will require trial and error, but we are working to give you better tooling in the future in addition to increasing the bytes limit.
-
UnreliableRemoteEvents are not currently prioritized over other traffic. This means delivery can be affected by other networked messages in your game, both reliable and unreliable. While weāve already implemented several methods to decrease the impact, weāre looking into further improvements for this scenario.
We want to hear from you!
We know this has been a frequently requested feature and weāre excited to work with you to improve it continuously. To help steer us in the right direction weād love to hear your feedback, questions, and any issues you encounter.
Thank you!