Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Timer Works until intermission is over?

Asked by 3 years ago
Edited 3 years ago

**My Timer Works until intermission is over, then it goes into negatives and doesn't restart to set number. it resets from 2 minutes, when it gets to 1 minute it racks up to 3 minutes then 2 minutes then 6 minutes etc... **

Output has no error related to timer

local timer = script.Parent
local minutes = 0
local seconds = 9
local timerQuota = 10

while true do

    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

    if minutes == 0 and seconds == 0 then
        while timerQuota >= 0 do

    timer.Text = "Intermission: ".. timerQuota ..""
    timerQuota = timerQuota - 1
            wait(1)
        end

local minutes = 6
local seconds = 29
    end
end

Answer this question