Wheels don't align properly

I’m currently working on a script which sets up constraints on a car for me.
The problem is that my wheels don’t align properly towards the car’s root.
image

This is the attachment from the car’s rootpart.

RA.Orientation = Vector3.new(0, 0, (90 * math.sign(wheel.Rotation.Z - .05)))

This is the attachment from the wheel.

WA.Orientation = Vector3.new(0, 0, -(90 * math.sign(wheel.Rotation.Z - .05)))

I have attempted using this on my root’s attachment RA

RA.Orientation = Vector3.new(0, (180 * math.sign(wheel.Rotation.X)), (90 * math.sign(wheel.Rotation.Z - .05)))

image

But as you can clearly see, the wheels face inwards instead of outwards now. Yes I tried adding a - before my Y axis and also multiplying it by *-1. No effect.

My replies might be very late as it’s currently 1 AM and I have a busy school day tommorow so I apologise in advance.

1 Like

Bump bump bump bump bump bump bump bump

Why not try multiplying them with CFrame.Angles(0,math.rad(180),0)?

Sry if this is inefficient as I’ve never worked with cars before

I use Vector3 since an attachment CFrame position and rotation can be changed separately.
I’m trying to set the Rotation Y to 180 if the wheel that the attachment belongs to has its Rotation X above 1.

What if you selected two wheels, front and back on one side, and pressed ctrl + R twice.

image
No effect

I meant to rotate them 180 together …

1 Like

Nevermind, I figured it out and rotating the wheels themselves did actually fix my problem. Thank you.

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