wait(1) while script.Parent.Position == (UDim2.new(0.25, 0,0.05, 0)) do script.Parent:TweenPosition(UDim2.new(0.25, 0,0.06, 0)) end --Now For Up-- wait(2) while script.Parent:TweenPosition(UDim2.new(0.25, 0,0.06, 0)) do script.Parent:TweenPosition(UDim2.new(0.25, 0,0.05, 0)) end
It crashes my studio too lmao
After fixing all these problems we get a script that loops somewhat like this,
while wait() do if script.Parent.Position == (UDim2.new(0.25, 0,0.05, 0)) then script.Parent:TweenPosition(UDim2.new(0.25, 0,0.06, 0),"Out", "Quad", 0.02) elseif script.Parent.Position == (UDim2.new(0.25, 0,0.06, 0)) then script.Parent:TweenPosition(UDim2.new(0.25, 0,0.05, 0),"Out", "Quad", 0.02) end end
However you made it move so slightly that you'll probably never notice it. So I made it move faster and further. We also really don't need conditional statement, we can just wait for the tween to stop. Example,
while wait(0.5) do script.Parent:TweenPosition(UDim2.new(0.25, 0,0.7, 0),"Out", "Quad", 0.5) wait(0.5) script.Parent:TweenPosition(UDim2.new(0.25, 0,0.4, 0),"Out", "Quad", 0.5) end
Here's a link for more about tweening.
Good Luck!