When building vehicles, why is detecting input with LocalScripts more network efficient?

I was researching about the matter because I wanted to build a simple vehicle (using a vehicle seat and hinges), and I saw people saying that detecting player input locally and sending it to server through remotes is more efficient and has less delay. Why and how so, given that remote events must also communicate with the server? Shouldn’t the delay be similar?

Here’s what I already know:

  • I know that using LocalScripts allow for more varied input detection and is more flexible. What I want to know is solely if it had less delay or is more network efficient.

Taking advantage of the position in my own topic, I’d also like to ask something: If I am to end up using remote events to control a vehicle, what is the best option, assigning each vehicle an ID and storing the remotes in ReplicatedStorage, then sending IDs so that each vehicle can identify if it is the one being controlles, or storing the remotes inside the vehicle itself, making each vehicle have its own set of remotes?

Thanks in advance!

Client input detection is instant, the client then can send input to the server, which is faster than waiting for replicated seat data, like VehicleSeat.Throttle. Then you could also optimize how often input is sent, reducing network traffic.

I’d use assigning a vehicle an ID via server. Having each vehicles own set of remotes and having multiple vehicles will result in higher memory and network usage.

1 Like

Thank you very much. Godspeed, fellow dev.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.