Torso.CFrame=Torso.CFrame*CFrame.Angles(math.deg(), math.deg(), math.deg())
I'm trying to make a player's character spin, and I'm not sure whether to use math.deg() or math.rad()
Torso.CFrame=Torso.CFrame*CFrame.Angles(math.deg(), math.deg(), math.deg())
I'm trying to make a player's character spin, and I'm not sure whether to use math.deg() or math.rad()
Math.rad turns a number into a radian, math.deg turns it into degrees. So if I wanted to rotate a brick by 45 degrees on the x axis I would do :
Brick.CFrame = Brick.CFrame*CFrame.Angles(math.rad(45),0,0)
Math.deg turns a radian into degrees, not "back into a number". Radians are numbers as well as degrees
Idk what I was thinking. Thanks for noticing that!
CFrame.Angles only accepts radians, so you would use math.rad to convert your degrees to radians
CFrame.Angles() will accept any number. CFrame.Angles(1,0,0) and CFrame.Angles(math.deg(.1),0,0) would both work. Radians are what you use to set it to a specific angle.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
2pi radans = 360 degrees, or one whole spin. Maybe that will help a bit?
Still unclear to me,