I’m attemping to make a countdown after the player inputs a certain amount of seconds. I’m not sure how to make this work.
Heres the code
`local frame = script.Parent
local box = script.Parent.Input
local button = script.Parent.Submit
local label = script.Parent.Countdown
task.wait(.001)
label.Parent = frame
frame.Visible = true
frame:FindFirstChild(“Countdown”).Visible = false
button.MouseButton1Click:Connect(function()
--Next few lines = the UI disappearing & the title appearing
frame.Input.Visible = false
frame.Submit.Visible = false
frame.Arrow.Visible = false
frame.DeveloperTag.Visible = false
frame.Tip.Visible = false
frame.Title.Visible = false
frame.Warning.Visible = false
frame:FindFirstChild("Countdown").Visible = true
--Next few lines = the label working
if not tonumber(box.Text) then return end
for i = box.Text, 1, -1 do
label.Text = i
end
end)`
When I run it and input a certain amount of seconds it just shows 1