Hello. My script is slow!
q=true script.Parent.MouseButton1Click:connect(function() if q then q=false for i=50,250,0.1 do game:GetService("RunService").RenderStepped:wait() script.Parent.Parent.Position = UDim2.new(1, -(i), 0, 500) end q=true end end)
It`s at a rate of 30/s
It`s made for making an animation...
I`ll upload the .gif later.
It would be much simpler to use the TweenPosition
method on the GUI. Like this:
script.Parent.Parent:TweenPosition( UDim2.new(1, -250, 0, 500), --Replace this with where you want the GUI to be "Out", --Replace this with the direction of the tween "Linear", --Replace this with the style of the tween 10 --Replace this with the duration of the tween )
It's much easier! Hope this helped!
Note: For more information on TweenPosition, click here: TweenPosition
Put a Wait()
. I'm sure it'll help.