So I have a script to make a box with parts and for some reason it doesn't wanna rotate correctly with CFrame.Angles. It Instead does this
Code:
Part.CFrame = Part.CFrame * CFrame.new(0,-i + #Matrix + 3,b + 2) * CFrame.Angles(0,90,0)
So I have a script to make a box with parts and for some reason it doesn't wanna rotate correctly with CFrame.Angles. It Instead does this
Code:
Part.CFrame = Part.CFrame * CFrame.new(0,-i + #Matrix + 3,b + 2) * CFrame.Angles(0,90,0)
Angles takes radians, and not degrees. You can convert degrees to radians with the math.rad function:
CFrame.Angles(0, math.rad(90), 0)
But this can be simplified. Remember that pi radians is 180 degrees so pi/2 radians is 90 degrees:
CFrame.Angles(0, math.pi/2, 0)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Oh yeah forgot about that thanks