Every time I die the timer restarts and I need it to keep going where it left off when i respawn pls help.
local time = 300
for i = 1, 300 do
wait(1)
time = time - 1
script.Parent.Text = tostring(time)
end
Every time I die the timer restarts and I need it to keep going where it left off when i respawn pls help.
local time = 300
for i = 1, 300 do
wait(1)
time = time - 1
script.Parent.Text = tostring(time)
end
Make the number z in the for loop -1.
local time = 300
for i = time, 1, -1 do
wait(1)
script.Parent.Text = i
end
Don't forget to accept the answer if I helped!
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
ill try it
Thanks!
i tryed it and the timer still resets when i die do you have another thing i could try?
Oh, so it turns out that StarterGui has a property called "ResetPlayerGuiOnSpawn". Just set this to false.