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
I see that your script runs the function, then it turns the cancollide to true, but then it wouldn't turn false again, as that was only in the start of the script. I guess the solution would be to make the CanCollide true inside the function, then make them false again.