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

How would I CFrame rotate a part on the parts axis? [Solved]

Asked by 10 years ago

I have the typical

    CFrame.Angles(0,0,0)

But I cant figure out what method to use. Any help?

1 answer

Log in to vote
0
Answered by
Tkdriverx 514 Moderation Voter
10 years ago

part.CFrame = part.CFrame * CFrame.Angles(0, 0, 0)

Remember, the inputted numbers have to be in radians, so: ... CFrame.Angles(0, math.rad(90), 0) will rotate it on the Y axis 90 degrees.

0
So it already rotates on the parts axis? Orlando777 315 — 10y
0
Yes, it rotates on an axis. It takes some experimenting to find how it works exactly. Because the Y axis is rotating AROUND the Y axis, etc. Tkdriverx 514 — 10y
0
*Facepalm* Lol, brain fart I guess. Thanks again. Orlando777 315 — 10y
0
It happens even to the best of us. xD Tkdriverx 514 — 10y
Ad

Answer this question