How is vehicle networking done?

I tried controlling vehicles by just doing it all server side and getting input client side, but that results in huge input lag, and doing it client side wouldnt replicate, how can i solve this?

1 Like

I believe it’s pretty complicated. The way I (am trying to) do it is by having a clientside copy, which the client has immediate control over, and then try to have the server side copy the behaviour of the client side version.

It’s pretty tough and involves a bunch of maths. If there’s a better way to do it, i’d love to hear it (would save me a ton of time).

Note that depending on your application, this may be overcomplicated! Apparently roblox lets you give the client authority over some objects if you do it via a server script, as Flubberlutsch noted.

I don’t have experience with roblox’s network ownership, and intuitively I think it’d lead to a lot of problems since “client authority” is a bit different from my “hack” (server authoritative + client copy instance)

Physics and movement of parts do replicate from a client, given the client has network ownership over the parts. I suggest setting the vehicle’s parts’ owner to the driver.

1 Like

The way I work mine is by using :SetNetworkOwner then controlling everything ClientSided as it is then replicated.

Not sure if this is 100% performance friendly.