I’ve been working with scripts for about 2.5 years, but do RemoteEvent objects have bandwidth?
Note: Please label your question with your actual question instead of putting “I have question”.
Yes they do have bandwidth (it seems)
Remote Event Limitations
- Can be fired up to 20 times per second
- Up to 50 KB* per second
These limits apply to each client trying to signal the server. It also applies to the server signals all clients overall, not each client independently.
* The 50 KB limit has been tossed around a lot, but I couldn’t find documentation on it. You should conduct your own tests to find out the limits for your own game!
Yes, RemoteEvents fire data and are subject to bandwidth limitations.
Here’s additional information:
Bandwidth of RemoteEvents
- Rate Limit:
- Roblox imposes a limit on the amount of data RemoteEvents can send per second. While the exact limit isn’t publicly documented, it depends on:
- Size of Data: Larger data packets consume more bandwidth.
- Frequency of Events: Sending events too rapidly can hit the bandwidth cap.
- Serialization Overhead:
- Data sent via RemoteEvents is serialized (converted into a transmittable format), which adds a small overhead, increasing the total size of the data being transmitted.
- Throttling:
- If the script exceeds Roblox’s bandwidth limits, the platform may throttle (slow down) or drop some RemoteEvent messages to maintain stability for the server and clients.
This is to my knowledge could be wrong
I’m Pretty sure roblox has never officially released at least not to my knowledge the actual data on how many times per min or the KB per sec.
If you really want this information i guess you could perform something like this
--Server Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Create or use an existing RemoteEvent
local TestEvent = Instance.new("RemoteEvent")
TestEvent.Name = "TestEvent"
TestEvent.Parent = ReplicatedStorage
local count = 0
-- Listen for the RemoteEvent
TestEvent.OnServerEvent:Connect(function(player, dataSize)
count += 1
print(string.format("Received event #%d from %s, Data Size: %d bytes", count, player.Name, dataSize))
end)
--Client Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Get the RemoteEvent
local TestEvent = ReplicatedStorage:WaitForChild("TestEvent")
-- Function to test RemoteEvent
local function testRemoteEvent(event, dataSize, frequency, duration)
local startTime = os.clock()
local eventsSent = 0
-- Create a table with dummy data of the specified size
local testData = string.rep("X", dataSize)
while os.clock() - startTime < duration do
event:FireServer(testData)
eventsSent += 1
task.wait(1 / frequency) -- Control the frequency of firing
end
print(string.format("Test complete: Sent %d events with %d bytes each over %.2f seconds", eventsSent, dataSize, duration))
end
-- Test Parameters
local dataSize = 1024 -- Size of the data in bytes (1 KB)
local frequency = 20 -- Events per second
local duration = 5 -- Test duration in seconds
-- Run the test
testRemoteEvent(TestEvent, dataSize, frequency, duration)
I’m pretty sure I’ve seen these numbers floating around a lot as well, and I think they’re definitely a good general indicator of RemoteEvent limitations. While the exact limits might vary depending on Roblox’s internal systems, this is a solid reference point for most cases.
To keep things simple, I’d recommend going with these numbers.
Perhaps if he finds himself pushing these limits in a live game, it would be a good idea to run controlled tests to verify how his game handles different data loads and frequencies. Having a bit of buffer room below the theoretical max is never a bad idea, either XD