Car replicating to the server but not to other clients

Hello, this is my first post on the dev forum.
I’m in the process of making a car game, and the cars are controlled via constraints. The car script is a serverscript, and using it works as intended on the client and replicates to the server as intended. However, on other clients, the car seems to not move at all, briefly teleporting only the wheels every now and then. Also, touching the car just makes said car jank and fling around.

The car does replicate to other clients once the player is no longer sitting on the car seat. I’ve tried sending a remote event to control the constraints from the server to the client assuming it might fix the network ownership issue, but that seemingly did nothing.

A few things to add:
The car’s seat is not a driver’s seat; but a regular one.
The entire cars network ownership is owned by the player driving it.
The cars are cloned from the server from a folder in workspace, and the scripts are distributed from another serverscript.
None of the parts are anchored.

You generally don’t want the constraints on the server due to lag. You can usually keep them entirely client sided. When a player hops in a vehicle, have the server hide the car and tell all clients through remote events to spawn a car with a player in it. You can then use remote events to tell the clients when and where to move the car.

Hey, try to store every example (car model) in the replicated storage. Also you can try to look after what moment the cars disappear or do they disappear on :Clone().

There are many reasons not to do this from the server. In the end, you will come to understand why as you try to go fully server-based.

could you go a little more into detail on how this works please? i’m having difficulty applying this in-game. thanks

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