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 = UDim2.new (0, 0,0, 50)
GUIBar:TweenSize(UDim2.new (0, 600,0, 50))
end
StartButton.MouseButton1Click:connect(OnClicked)
What do I need to do here?

1 comment
GUIBar.Size = UDim2.new (0, 0,0, 50), "Out", "Quad", SECONDS) Put seconds of how long you want the gui to tween