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

I need help making a minutes seconds timer?

I need to make minutes seconds timer. I used the following code:

local timer = script.Parent
local minutes = 2
local seconds = 19
 
repeat
    if seconds <= 0 then
        minutes = minutes - 1
        seconds = 59
    else
        seconds = seconds - 1
    end
    if seconds <= 9  then
        timer.Text = tostring(minutes)..":0"..tostring(seconds)
    else
        timer.Text = tostring(minutes)..":"..tostring(seconds)
    end
    wait(1)
until minutes <= 0 and seconds <= 0

It worked but my timer resets when players resets his character. I need to make a timer when player resets his character or die it should not reset the timer.

Please help me.

1 answer

✓ Accepted answer

Well, I assume it's a Local script. The easiest way to fix the option of resetting on spawn is :

  1. Add a ScreenGui and put that script in it, if you don't have one.
  2. Click on your ScreenGui and go to its properties.
  3. Unselect ResetOnSpawn option, i.e., that option must be set to false.

Lemme know if it helps!

5 comments

0

game:GetService("StarterGui").ResetPlayerGuiOnSpawn = false This does not work.

0

It did not solved my issue.

0

They removed that ^ hes telling you to press on the ScreenGui its self and mark the "ResetOnSpawn" PROPERTY to false. then it will solve your problem

0

I will try and tell

0

It helped me.

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