I'm super new to this. I made a script that is supposed to make the Part go up and down if _G.Flight is 1, and if not, goes back to the starting position. I have no clue what I'm doing wrong. It doesn't give me an error in the console, it just doesn't work.
rotor = workspace.Interior.Console.Rotor.RotorBottom.Middle
if _G.Flight == 1 then
for i = 1,16 do
wait(0.01)
rotor.CFrame = rotor.CFrame * CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
end
for i = 1,16 do
wait(0.01)
rotor.CFrame = rotor.CFrame * CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
end
else
rotor:SetPrimaryPartCFrame(CFrame.new(9936.876, 60.019, 17.572))
end
