Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you rotate a part 180 degrees?

I have a, let's say, part with a rotation of Vector3(0,41.5,0) and I want to rotate it 180 degrees on the Y axis. If I write 221.5 it doesn't work.

Do I have to add like Vector3.new(0,math.rad(180),0) or something? Help

1 answer

✓ Accepted answer

Do like this:

game.Workspace.Part.CFrame = game.Workspace.Part.CFrame * CFrame.Angles(0,math.rad(180),0)

Also, you don't use math.rad in Vector3, math.rad Translates in Radians, Vector3 is in radians already.

2 comments

0

I tried *CFrame.Angles(0,math.pi,0) (same thing) but didn't work

0

AH CHANGED IT TO MATH.RAD(90 AND IT WORKED)

This discussion is preserved as it was. New answers, comments, and votes are closed.