Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I get a timer that doesnt reset when the player dies?

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 

1 answer

✓ Accepted answer

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!

4 comments

0

ill try it

0

Thanks!

0

i tryed it and the timer still resets when i die do you have another thing i could try?

0

Oh, so it turns out that StarterGui has a property called "ResetPlayerGuiOnSpawn". Just set this to false.

This discussion is preserved as it was. New answers, comments, and votes are closed.