Ok, This code is designed to rotate a model(ArmRotatorTwo) but it only rotates 1 time and stops, but it moves up and to the right like I want.
I need help, this has to rotate slowly to -65 and move up and right to maintain its position.
I have been looking for video's and internet help for 4 days. can anyone help me please.
everything works but the rotation.
local ArmOne = script.Parent.Parent.ArmRotatorTwo.ArmOne
local ArmTwo = script.Parent.Parent.ArmRotatorTwo.ArmTwo
local Rotater = script.Parent.Parent.BraceRotater
local Four = script.Parent.Parent.ArmRotatorTwo.PartFour
local One = script.Parent.Parent.ArmRotatorTwo.PartOne
local Three = script.Parent.Parent.ArmRotatorTwo.PartThree
local Two = script.Parent.Parent.ArmRotatorTwo.PartTwo
local Brace = script.Parent.Parent.ArmRotatorTwo.Brace
local Left = script.Parent.Parent.ArmRotatorTwo.LeftArm
local Right = script.Parent.Parent.ArmRotatorTwo.RightArm
local Model = ArmTwo.Parent
local Prime = Model.PrimaryPart
local ArmRotation = ArmTwo.Rotation.Z
local NumberOne = 0
local NumberTwo = 0
Rotater.CanCollide = false
ArmOne.CanCollide = false
ArmTwo.CanCollide = false
Four.CanCollide = false
One.CanCollide = false
Three.CanCollide = false
Two.CanCollide = false
Brace.CanCollide = false
Left.CanCollide = false
Right.CanCollide = false
function Rotate()
wait(.5)
print ("Start")
while (ArmRotation > -65) do
Model:SetPrimaryPartCFrame(CFrame.new(Prime.CFrame.X - .05, Prime.CFrame.Y + .05, Prime.CFrame.Z))
wait(.2)
print ("Done Step One")
CFrame.Angles(Prime.Rotation.X, Prime.Rotation.Y, Prime.Rotation.Z - 0.05)
print ("Done Step Two")
NumberOne = NumberOne + 1
print(NumberOne)
wait(.2)
end
end
script.Parent.ClickDetector.MouseClick:connect(Rotate)
wait(.1)
Rotater.CanCollide = true
ArmOne.CanCollide = true
ArmTwo.CanCollide = true
Four.CanCollide = true
One.CanCollide = true
Three.CanCollide = true
Two.CanCollide = true
Brace.CanCollide = true
Left.CanCollide = true
Right.CanCollide = true

3 comments
Try replacing CFrame.Angles(Prime.Rotation.X, Prime.Rotation.Y, Prime.Rotation.Z - 0.05) with CFrame.Angles(math.rad(Prime.Rotation.X), math.rad(Prime.Rotation.Y), math.rad(Prime.Rotation.Z - 0.05))
Thanks alot for trying to help, but it still must rotates one time to the 0 position and continues to move up and over, i have tried many different things, as well as removing the second command and it still does the same thing. So the second command doesnt do anything for some reason. all of its commands are comming from the first line. I have moved that around many different ways as well and a
*just rotates