I'm using a timer to see if anyone can finish in 2 minutes for my obby game but when ever we die then the timer restarts. Can anyone help me I want the timer to continue. The script is
script.Parent.Parent.Play.MouseButton1Click:Connect(function()
local seconds = script.Parent.Parent.Time
script.Parent.Text = seconds.Value
for i = 1,seconds.Value do
wait(1)
seconds.Value = seconds.Value - 1
script.Parent.Text = seconds.Value
end
if script.Parent.Text == "0" then
script.Parent.Sound:Play()
end
end)
Btw I'm new to lua.

2 comments
Don't forget to accept my answer if it helps.
Thank you so much incapaxx! It did work but I don't know how to accept your answer.