Motor6D glitches out when rotating the C0

Hello. I am making a story game bus and I want to rotate its wheels, the bus is welded to a primary part inside the bus, but when I rotate it, it works fine for a few seconds, then it glitches out and messes up the position. Here’s the code I use to rotate it(I use it in the command bar, not implemented in the game just yet), Here’s a video:
https://streamable.com/nvs8yg
And here’s my code:

game:GetService("RunService").Heartbeat:Connect(function()
	local motor = workspace.Rings.Bus.Bus.Wheels.FL.Wheel.WheelMotor
	local cf = (motor.Parent.CFrame * CFrame.fromOrientation(0,math.rad(190),0));
	motor.C0 = cf:Inverse()
    motor.C1 = motor.Part1.CFrame:Inverse()
end)

I appreciate any help! :slight_smile:

1 Like