What is The Best Way & Easiest Way To Make a Custom Inputted Countdown Timer?

What is the best way and the easiest way to make a custom countdown timer?

What I mean by this is, a player inputs a certain amount of seconds/minutes/whatever, and then a textlabel counts down from then. After the timer is over, it makes an alarm sound and you can reset it and input a different time? I’m testing different things I can do before committing to an actual game. Thank you!

Put a TextBox in a gui, and have a TextButton to submit the time.

--this would be the countdown part
local box = --path to box here
local button = --path to button here
local label = --path to TextLabel here

button.MouseButton1Click:Connect(function()
    if not tonumber(box.Text) then return end
    for i = box.Text, 1, -1 do
        label.Text = i
    end
end)

Hello! everything worked fine except, the countdown doesn’t go down. the label just says 1. i dont know why. thank you!

Might be happening too fast. Within the loop, just add a task.wait(1). Hope this helps!