How to make a part face the same direction as other part

I have a raycast car and I need the wheels to face the direction that the car is facing

as you see the wheels dont aligned with the way the car is facing

I tried using cframe but I cannot get it right

wheel.CFrame = CFrame.lookAt(wheel.Position,, 0, 0))

I want the wheels to always like this

I would probably tween a number value when the player left or right and use that to determine the direction of the wheels.

sorry if Its not clear, I double tapped space and it just posted my post when I wasn’t finished, anyway

I want all of the wheels to not spin around like they are in the vidoe, I just want them all facing the direction they should be facing, I tried using cframe to face them in the direction that the carbody is facing but it no worky

I want them to stay like this

I found how to do it, someone said in this post to get the angle you just get the cframe and then remove its position to only have the angle, heres it in code

local cfAngle = mainBody.CFrame - mainBody.Position

so with this code, ima able to keep the wheels facing the direction of the car’s body

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