I am trying for the first time (for me) to make an intro gui w/ a moving button but i'm being stupid and not making it work. Please look at my code and tell me how to make it not run into some weird loop or whatever it is doing to shut down my roblox studio.
Gui = {script.Parent.Frame, script.Parent.ButtonBack, script.Parent.TextButton, script.Parent.TextLabel, script.Parent}
Frame = Gui[1]
ButtonBack = Gui[2]
TextButton = Gui[3]
TextLabel = Gui[4]
Parent = Gui[5]
TextButton.MouseButton1Down:connect(function()
if TextButton.Position == UDim2.new(0, 860, 0, 445) then
print(TextButton.Position)
while TextButton.Position ~= ButtonBack.Position do
TextButton.Position = TextButton.Position+UDim2.new(0, 0, 0, 0.1)
end
end
end)
at line 9 i'm referring to what the position is/should be at the start.

1 comment
http://wiki.roblox.com/index.php?title=Tweening