I’m going to take a guess and say it’s because you’re setting NetworkOwner to nil. If the logic that makes the car move is on the client, the car will move on the client but the effect will not replicate because they don’t have ownership over the car. Set the ownership to the client to see the code replicate (raycasts)
when I first start the game, the car’s ownership gets set to nil on the server and then the server script runs a module script to do the raycasting and stuff, and then when the player sits in the vehicle seat, the server script stops running the module script and the client then runs the same module
driverSeat.Changed:Connect(function(property)
if driverSeat.Occupant then
local player = players:GetPlayerFromCharacter(driverSeat.Occupant.Parent)
if not player or not player.Character then return end
for _, part in pairs(player.Character:GetChildren()) do
if part:IsA('BasePart') then
part.Massless = true
end
end
mainBody:SetNetworkOwner(player)
else
mainBody:SetNetworkOwner(nil)
end
end)
Hm so not sure why you’re raycasting on the server, if the only time the car is actually moving is when someone (client) is driving it. it also looks like you’re pushing the car on the client so the location is different because of network ownership reasons. Thinking maybe it would be easier to remove the code that raycasts on the server and just do it on the client, then let roblox automatically set network ownership instead.