Still have questions? Join our Discord server and get real time help.
Log in to vote

How do you make SurfaceGUI/GUI tween, longer for a specific time?

Asked by
Lualaxy 78
2 years ago

So I made a tween size script for my simple SurfaceGui animation. My question is how do I make the tween size function run for a specific time so I decide when the gui part will reach my prefered tween possition?

My code:

local Frame = script.Parent.Frame
local StartButton = script.Parent.Frame.Start
local GUIBar = script.Parent.Frame.ProgressBar

function OnClicked()
    StartButton.TextScaled = true
    StartButton.Text = "In progress..."

    GUIBar.Size = (0, 0,0, 50)
    GUIBar:TweenSize( (0, 600,0, 50))



What do I need to do here?

GUIBar.Size = (0, 0,0, 50), "Out", "Quad", SECONDS) Put seconds of how long you want the gui to tween hellmatic 1502 — 2y

1 answer

Log in to vote
Answered by 2 years ago

You just have to add some things after the Udim2

GUI:TweenPosition(, 0, 1, 0), "Out", "Quad", 3) The last 3 would be the time, the things before the 3 are neccesary! (you can change them though)

(This is the same for tweensize)

Click here for the wiki

Thank you very much! Lualaxy 78 — 2y
Np :) RedcommanderV2 1256 — 2y

Answer this question