local i2 = script.Parent local i1 = script.Parent.Parent.ImageButton1 local i3 = script.Parent.Parent.ImageButton3 local frame1 = script.Parent.Parent local frame2 = script.Parent.Parent.Parent.Frame2 function onClick(i2) for i = -0.1,200 do i1.Position = i1.Position + UDim2.new(0,-0.1,0,0) wait(0.12) end end i2.MouseButton1Click:connect(onClick)
Try this.
local i2 = script.Parent local i1 = script.Parent.Parent.ImageButton1 local i3 = script.Parent.Parent.ImageButton3 local frame1 = script.Parent.Parent local frame2 = script.Parent.Parent.Parent.Frame2 function onClick(i2) repeat i1.Position = i1.Position + UDim2.new(0,-0.1,0,0) wait(0.12) until i1.Position >= -200 end i2.MouseButton1Click:connect(onClick)