Which is better for announcement system [ASK]

For performance , latency etc, is it better to use FireAllClients (OnClientEvent) or use FireServer (OnServerEvent)?
Note : like the title, for announcement system

4 Likes

FireAllClients and FireServer are very similar for performance since the first one fires all the clients, and the second fires the server which is already all the clients. So it is your choice, if you want to use one or the other.

2 Likes

So even if there are let’s say the worst scenario thousands of events fire in small amount of time, is gonna be similar in performance right?

3 Likes

Well I do not recomend firing thousands of events in a few seconds because that can definitely crash anything, but yes it is

3 Likes

No, I mean we talk about worst scenario only. So I can like imagine about the difference. Ah for last question, just curiousity
If we use
for i, Player in pairs(Players:GetPlayers()) do Event:FireClient(Player, Text)
end
is it gonna be the same as FireAllClients(Player, Text)

Well this is just for extra, your previous answer gonna be the solution.

2 Likes

Are you talking about the performance?

Because :FireClient() and :FireAllClients are different. FireClient only fires the event for the player and not all the players. So :FireClient() is better for performance of course. But if you need to fire the event for everyone, just use :FireAllClients()

I’m talking about is it gonna be the same if FireClient to everyone using for loops and FireAllClients

1 Like

Oh okay ^^

:FireAllClients is better for Memory and Performance. Also takes less lines of code because you don’t need to loop trough all the players.

Thank you, well but I think your previous answer about server is the solution because yeah that’s the topic. But once again, thank you.

1 Like

No problems man! :smiley:

(character limit eeeeeeeeeee)

If you found this helpful don’t forget to make the answer the solution :wink:

Already, on your previous answer.

1 Like

Oh yeah forgot to refresh the page, sorry haha :laughing: