Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Rotating a part that's welded?

Asked by 6 years ago

So I welded a part to my back, and the part is rotated incorrectly. Instead of it being flat on my back like I want it to be, the part is pointing out of my back. How would I turn this part to make it flat on my back?


weld.Part0 = part weld.Part1 = torso weld.C0 = CFrame.new (0.5, -0.5, 0) *CFrame.Angles(math.rad(-25),80.1,90)

When I try to edit the C0 via CFrame.Angles, it rotates in the wrong direction.

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

You just have to toy around with the CFrame Angles in Weld.C0 until you get the correct rotation as if you rotate it before the weld the C0 will just set it back.

Make sure you use Math.Rad() for all three values as without it the rotation will be wrong. With math.Rad you have the 0-360.

Ad

Answer this question