Reducing vehicle lag with SetNetworkOwner(player), but worried about exploits?

Hi,

I’m creating a game where users can drive vehicles. Initially I used RemoteEvents and let the server control the vehicles movement, however this had a ton of input lag for the player driving the Vehicle.

To combat this, I now SetNetworkOwner to the driving player for all the vehicle parts, and letting the client control the movement. This has worked perfectly for stopping input lag.

However, I’m worries that a malicious user could easily teleport the vehicle around the map, as they can now do whatever they like physics wise.

Is there anything I can do to combat this? Is there a better way for vehicle control? Do I even need to be worried?

Thank you so much!

You can set up something with in the car controls that gets the position of the car every second then calculate the distance it traveled from the last second it saved a position. If this distance is too far than what the car is capable of driving. Of course giving it some wiggle room, then teleport the car back to the last checked position. And detect if the distance keeps going too high you can give the car it’s own collision group so that it cannot collide with players so that exploiters can’t use it to fling people. This would also work best if seats were manual like Press ‘E’ to sit instead of touched.

1 Like

Hello!

To make vehicles without this kind of trouble, I recommend you to use “A-Chassis”

Basically, this kit makes realistic cars and vehicles and it can help you with it.

A-Chassis mostly works with mesh cars but I think it works with brick cars.

Some popular games use this kit to make their cars work perfectly.

It has as well customizable options that will make your vehicle go as you want!

A-Chassis

You can watch some youtube videos on how to use this kit properly!