its not going up slowly it going up whole
script.Parent.button.MouseButton1Up:connect (function () for i = 0,1 do wait(0.1) script.Parent.Frame.ImageLabel.Size = UDim2.new(1, 0, 0. -i, 0) --wait(5) --script.Parent.Frame.ImageLabel.Size = UDim2.new(1, 0, 0, 0) end end)
As an alternative, you can use the TweenSize
method of GUI objects:
script.Parent.button.MouseButton1Up:connect (function () script.Parent.Frame.ImageLabel:TweenSize(UDim2.new(1, 0, -1, 0), "Out", "Quad", 1, true) --The true at the end lets you 'override' this Tween with another Tween if you expect one to occur. end)
You are going up only by 1. So Instantly you will hit your destination. You should try
script.Parent.button.MouseButton1Up:connect (function () for i = 0,1,0.1 do wait(0.1) script.Parent.Frame.ImageLabel.Size = UDim2.new(1, 0, 0. -i, 0) --wait(5) --script.Parent.Frame.ImageLabel.Size = UDim2.new(1, 0, 0, 0) end end)
All I did is add "0.1" to the end of "for i = 0,1" This is to tell the script to count by 0.1, Automatically it counts by 1. Also It will stop at 1 because you've assigned it to only go to 1.