I am sending information to the server, and then from the server, I send that information to the player’s partner. So, I use a remote event to the server, then from the server, I use another remote event and fire it to the player’s partner. The delay is about 0.5 seconds, which is pretty excessive. I understand that you can utilize invoke server for the same player, but this system doesn’t need to invoke. How would I go about creating less of a delay for the player’s partner?
Decrease the time the server takes to process the request(and the time the client takes as well). Assuming both clients have ping considered “normal” for today’s standards, let’s say 50 ms(0.05 seconds), the delay should be 0.05*2 = 0.1 = 100 ms. Since the delay is 5 times more than that, I assume that either one of the players is laggy, or something is being processed during the other 0.4 seconds.
I’m not sure. Right when the server receives the event, it does a sanity check, and then sends it to the partner, nothing else. Thanks for the input though.
Even if players have good ping, it still depends on the server (the load from scripts or constructions). So, apart from the ping between two players, we also have the ping to the server, which processes all of this and takes time to do so.
Is there a way to reduce ping from server?
Well, I’m not exactly an expert in this, but roughly speaking, fewer players mean better connection. In a general sense, many loops and unanchored items can affect the server. To improve, you can transfer some scripts that can be executed locally to the player, as local scripts run on the player’s computer and do not require server resources. But I recommend looking for tips in forums or posts, as I’m not deeply knowledgeable about this.
Thank you for the response. I will look into it. I appreciate it.