Why does my car do this when :SetPrimaryPartCFrame?

Hello, basically as the title says. When I :SetPrimaryPartCFrame my car model rotates 90 degrees. How can I fix this?

game.Workspace.Vehicles.CarModel1:SetPrimaryPartCFrame(CFrame.new(23.8, 3.308, -51.493))

Image

Maybe your primary part on the car is not facing the actual front of the car. Check which way the lookvector is facing on your primary part

Just multiply the CFrame point by a rotation CFrame.

Change your script to this:

workspace.Vehicles.CarModel1:PivotTo(CFrame.new(23.8, 3.308, -51.493) * CFrame.fromEulerAngles(0, math.rad(90), 0))

Change the values if it doesn’t rotate right.

1 Like

It works!!! Thanks @Katrist, you’re an absolute legend! :smiley:

No problem. If you have any more questions, feel free to ask.

Alr, sounds good. Have an awesome day!

1 Like

You too, have a great day.