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

How do i rotate a cylinder 90 degrees?

Asked by 6 years ago

Okay i'm trying to rotate this 90 degrees but its not working

shield = script.Shield:Clone()
shield.Parent = workspace
shield.Name = char.Name.."'s Shield"
shield.CFrame = char["Left Arm"].CFrame * CFrame.new(0,-7,0)

I've tried adding * CFrame.Angles (0,90,0) but it doesn't do a 90 degree turn. The shield is rotated wrong, when i try using rotation, i cframe it and it goes back to the original rotation

1 answer

Log in to vote
1
Answered by 6 years ago

CFrame.Angles needs radians. To simply do this, do

shield.CFrame = CFrame.Angles(0,math.rad(80),0)

Don't ask me why it needs radians, roblox likes making things complicated.

Hope this helps!

Ad

Answer this question