I already set the network ownership to the driver of the vehicle, however for some reason I still get input lag. like if I was to press the W, it wouldn’t move the vehicle until half a second later, then when I release the button the car wouldn’t stop moving until 2-3 seconds later depending on how many players the server has. What do you recommend I do to prevent laggy undrivable vehicles that constantly drive into buildings.
Setting the ownership should work fine. You’re probably still relying on remote events (or remote functions?)
If you have network ownership set, and don’t rely on remote events to move the car then you shouldn’t face the issue you’re describing. If you’re setting the ownership but still using remote events, this doesn’t change anything from not having network ownership.
The movement of the car should be handled on the client (setting the motor’s speed, wheel angle, etc) to get rid of input lag. These changes will replicate to the server (although not the property values themselves) assuming you continue to use network ownership.
I’m pretty sure what you’re doing wrong is setting network ownership and relying on the old system that used remote events. Just move the RemoteEvent system to the client only.
What about things that the server needs to control such as headlights, radios, etc?
Im having this same problem with nitro particle effect, sounds, and other things that only the server can handle, and im not even using remote events