FireAllClients() or FireClient()

  1. Hey Guys I have recently been using FireAllClients() I was wondering if there was an Alternative optimized better way to do this.

  2. The issue is when FireAllClients() is used a little to much it starts to cause ping issues for everyone in the server:


  1. I have recently switched over to FireClient() With mag and was wondering if this would help with ping at all or not?? I was also thinking that mag could be a bit Costly on the Server??

Is it worth it to put lots of stuff on the Client ??? Or is it ok for the server to see some stuff ??? I always thought the less the server could see the better for Ping and Optimization!!!

1 Like

It depends, like if you want your game not be laggy so you should use Local scripts

For eg:

If you want to make web shooter then use local script
if its in server script then whole server gonna be messy and laggy.

You have to learn from where to use local scripts and from where to use normal scripts

Local scripts are mainly used in Guis or Tools.
And i use :FireClient() ins tead of :FireAllClients()

FireClient() is used when you want to have a specific client do something
FireAllClients() is used when you want all the clients do something

for example, if you want to make a visual effect visible to everyone, use FireAllClients(), but if you only want to make it appear on one specific player’s screen, use FireClient()

in your script:

that amount of FireClient() is unnecessary, you would only need to fire it once, then have the client do the rest.
Example (server):

ReplicatedStorage.Remotes.Events.Effects:FireClient(oplay, "do the thing")


    if event == "do the thing" then
    	--Character.LeftHand ~~~ RocketBlasterRemove
    	--Character.HumanoidRootPart ~~~ Explosion

the top 4 do one thing the other 1 does another thing there all not used for the same thing

Correct me if I’m wrong but FireAllClients shouldn’t start to cause ping issues, unless you’re firing it over and over in the duration of under a second.

In your code you seem to have three ‘FireAllClients’ lined up. Is it possible you can merge them all into one? This would help with performance.

In the code that receives the RemoteEvent being fired, you could make a custom function. Like instead of having 3 of the FireClients at the top, turn it all into one just for that specifically. You can keep the other remotes but merging those into one would help a lot.

you’re firing the same event like 5 separate times, all in one setting in your script. Which makes it no different if you just use FireClient() once, and have the client do the checking and whatever then perform the whatever its going to do.

there are arguments in each one

my guy. You do not need to fire the same event 5 times just to send different arguments. You can send it one time and have the client handles the rest.