infobutton.MouseButton1Down:connect(function(open)
if infoframe.Position == UDim2.new(0, -200, 0.4, 40) then
infoframe:TweenPosition(UDim2.new(0, -200, 0.4, 40), "Out", "Quad", 1, false)
infoframe:TweenPosition(UDim2.new(0, 0, 0.4, 40), "Out", "Quad", 1, false)
else
infoframe:TweenPosition(UDim2.new(0, 0, 0.4, 40), "Out", "Quad", 1, false)
infoframe:TweenPosition(UDim2.new(0, -200, 0.4, 40), "Out", "Quad", 1, false)
end
end)
How come the above won't work, but the below will? It shouldnt need a wait to it, and it wont work with a wait()
infobutton.MouseButton1Down:connect(function(open)
if infoframe.Position == UDim2.new(0, -200, 0.4, 40) then
infoframe:TweenPosition(UDim2.new(0, -200, 0.4, 40), "Out", "Quad", 1, false)
wait(1.5)
infoframe:TweenPosition(UDim2.new(0, 0, 0.4, 40), "Out", "Quad", 1, false)
else
infoframe:TweenPosition(UDim2.new(0, 0, 0.4, 40), "Out", "Quad", 1, false)
wait(1.5)
infoframe:TweenPosition(UDim2.new(0, -200, 0.4, 40), "Out", "Quad", 1, false)
end
end)
