Hi, i want to fire a clientevent on 2 players the same time. When i just make
remote:FireClient(player1)
remote:FireClient(player2)
it first fires the event for player1 which takes some seconds then it fires player2. Is there a way to fire them at the same time?
If for some reason it is waiting before firing the other client you could use a coroutine structure like this:
coroutine.resume(coroutine.create(function() remote:FireClient(player1) end)) remote:FireClient(player2)
This will run the code in it's own separate coroutine aside from the code beneath it.
--Use "Spawn(function()" -- Example spawn(function() plr:FireClient() end) -- rest is fine after you do it for first fire
FireClient should not take any seconds at all. It isn't a yield function which means it doesn't wait for anything. Doing what you posted should fire to both clients almost simultaneously, with a negligible difference which shouldn't matter due to other much bigger factors such as traffic delays.