Model:MoveTo() kicks player off seat in car

I am trying to move a car using Model:MoveTo(), however there is a bit of a problem, it kicks the player off the seat when I’m moving it, and before you tell me to use CFrame, I have, but this car uses a special Chassis that flips out and flings out of the world if there is any snapping movement with it.

I’ve searched all over google searching for what it was, and to no avail, there was nothing that could help me. I created a quick example in 5 minutes and hopefully it gives you a better understanding of what I am trying to get at.


Basically I just want the player to go with the car and CFrame breaks the car, and MoveTo kicks the player out of it.

If for any reason you need the code, here it is.

script.Parent.ClickDetector.MouseClick:Connect(function()
	wait(7)
	script.Parent.Parent.Parent.Parent:MoveTo(workspace:WaitForChild("Point1").Position)
	end)
2 Likes

what you can do is after you have teleported the car, teleport the player back into the car after they are kicked out.

The car would be moving as they are teleported, it is supposed to be a seamless teleport to a different area of the map while driving, so if I were to teleport them with the car, they would spawn above the car and fall behind as the car rolls off into the distance. Even if I was able to get them into the car without flying out, the cooldown from the seat would come in and prevent them from sitting for 3 extra seconds.

Still not clear on how you implemented the CFrame attempt. Did you use Model | Documentation - Roblox Creator Hub or did you set the CFrame variable of one part? I believe set PrimaryPartCFrame should work if I’m not mistaken as it should move all the parts simultaneously.

I believe the glitches is caused by the constraints if the model movement is not simultaneous which happens so you can either disable em or anchor the car parts before teleporting.

I used [modelname].PrimaryPart.CFrame = CFrame.new(point1, position)
(I don’t remember exactly what was inside the CFrame but it did teleport the model), with a primary part being the seat, it teleported the whole model, however the model had different plans and decided to fling out of the map.

(I followed this Player not moving with vehicle seat - #6 by royaltoe)

you could lower the cool down, and :Sit() makes then sit right away.

Where do I find the cooldown? If I were to just make them sit immediately, I am pretty sure they would just sit without getting into the seat and just slump over.

Yeah the issue in the CFrame code is that you are only setting the CFrame of the PrimaryPart and only the parts welded to the car move along.

However the chassis uses constraints and so the wheels are not solidly connected to the car and are not teleported alongside.

The fix is to use :SetPrimaryPartCFrame which moves the entire model and not just the primary part and the parts rigidly connected to it.

I tested it out with A Chassis it works.

1 Like

Okay, I’ll test this and report back with what happens, I have high hopes for the SetPrimaryPartCFrame method.

Well its worth a try, if it dosent work, you can try something else

Yeah I’m writing it at the moment

It actually worked, I was able to move the model with CFrame without glitching the wheel constraints, thanks! I’ll put your answer as the solution.

1 Like

What did u switch to add the SetPrimarypartCframe. im having the same issue and im confused what to delete to add SetPrimaryPartcframe