What is Network Ownership

Im making a Train Game and the Player controls the Train with RemoteEvent, if he clicks forward a RemoteEvent will send to the Server and the Train will be faster. But i saw it can be laggy and i saw Network Owner Ship. I dont use Roblox DriverSeat im just welding the Player to the Train and he can control it via RemoteEvent but for what is Network Owner Ship?

1 Like

NetworkOwnership is what the physics is controlled by. For example, your character has you as the network owner. If you suddenly disconnect, you can still walk around, because physics are controlled by your client.

NetworkOwnership applies to all clients. If no network owner is set, it will default to the server. The parts also must be unanchored.

1 Like

Okay Thanks and most People say i should use NetworkOwnership for Vehicle but why?

Usually, VehicleSeats and Seats set the NetworkOwner of the vehicle to the sitting player. This makes the vehicle much speedier since there’s no latency. If the owner is the server, it will need to take a while for all physics calculations to transfer to the client and back. The “Driving” client is the one who should have ownership of the vehicle.

Will this just work for Seats?

I think so. You should probably script it yourself, as there might be problems with multiple seats.

If I have a spawning system that clones a vehicle and puts it in workspace for player1, should I set vehicle’s ownership to player1 it or let it default to whoever is in the seat? (If player2 uses the vehicle player1 spawned will the ownership still be set to the player1 who spawned it and therefore lag for the new driver?

What is the disadvantage of each? Also, how much control would the client have?

If the client has the ownership of the vehicle, they can teleport the car to anywhere and change its properties. But if the owner is the server the client wont be able to use exploits to change properties, but it will cause the vehicle to have some lag

Correct. You want to set the network ownership to the player who is in the seat. However, if nobody is in the seat, I’d recommend setting it to the player that spawned the car.

The reply that you already received for this sums it up pretty well, but essentially, the player that has network ownership can move the parts around and they will replicate to the server. The client will have full control. On the other hand, if the server had the network ownership, then the client will have to say, “okay server, move the car forward” and it will take a while for the server to respond. This will create a bad user experience. However, it will be impossible for the client to teleport around and exploit it.

3 Likes