How to tween position faster(GUI)

this is my script:local frame = script.Parent.Parent.Parent.Frame
local button = script.Parent
local toggle = false

button.MouseButton1Click:Connect(function()
if not toggle then
toggle = true
frame:TweenPosition(UDim2.new(0.325, 0,0.156, 0),“In”,“Quad”,1)
else
toggle = false
frame:TweenPosition(UDim2.new(0.325, 0,1.1, 0),“Out”,“Quad”,1)

end

end)

how do i speed up the GUI movement

4 Likes

the last parameter you wrote is the time it should take, just read the wiki and you would see that

As stated above it is recommended you look at the TweenPosition API which can be found here. If you don’t feel like it then all you need to know is change the last parameter in the TweenPosition to a lower number, so something like this.

GUI:TweenPosition(UDim2.new(0.325, 0,0.156, 0), "In", "Quad", .5, true)
4 Likes

what is the true mean--------------------

Check out the API. It basically means you can overwrite the tween when it’s currently going, so if you want to stop it but it’s somehow still doing the first tween it will stop the first tween.

1 Like