Here is the code, again i am trying to make my gui stop after it has hit a specific size i use a while loop in my script and i try to break that loop once my gui has reached it's desired size but it keeps going past my intended size.
button = game.Workspace.button isDown = false button.ClickDetector.MouseClick:connect(function() if not isDown then isDown = true while isDown do wait(2) script.Parent.Size = UDim2.new(script.Parent.Size.X.Scale-.1, script.Parent.Size.X.Offset, script.Parent.Size.Y.Scale-1, script.Parent.Size.Y.Offset) if script.Parent.Size == UDim2.new({-0.7, 150},{0, 30}) then -- having trouble around here break end end else isDown = false print("Door Down") end end)
UDim2.new({-0.7, 150},{0, 30})
This is one mistake i found. I've never needed to change the Size like that so i'm not sure if that's the whole problem, but try this instead:
UDim2.new(-0.7, 150, 0, 30)