Hello.
For a project I'm working on, there is a general purpose Timer GUI that is supposed to show time remaining. (Basically like a loading bar)
Here is my code for it: The timer bar is located under > StarterGui -> gameGui -> FloatTop -> gBar
if Request == "countDown" then
gText.Text = "Intermission"
gG.Visible = true
gR.Visible = false
gBar.Size = UDim2.new(1.087,0,0,4) -- Timer, original size
gBar:TweenSize(UDim2.new(0,0,0,4), "InOut", "Linear", 15) -- Timer, new size, 15 sec. later
for i = 15, 1, -1 do
gTimer.Text = i
wait(1)
end
end
The problem is, it doesn't seem to work. How can I animate this line so it goes from size (1.087, 0, 0, 4) to (0, 0, 0, 4) in 15 seconds, smoothly?

1 comment
Your sizes don't make sense. (1.087,0,0,4) to (0,0,0,4) would make the bar dissapear since the x would be 0.