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

How to Stop the timer and Continue to the next Question?

Asked by
KenUSM 53
7 years ago

I made a quiz where there is a timer, but I made a function that if you Answered the question before the timer that it should be able to skip to the next Question. It does all of that but it doesn't skip to the next question, instead, it continues to use the timer.

if on == true and TimerOn == true then
    for t = 20,0,-1 do 
        Countdown.Text = t
        TextBox.Changed:connect(function()
            if EnterStorage.Text == A3 then 
                Score.Value = Score.Value + 10
                EndTest.Value = EndTest.Value + 1
                Correction.Text = "Correct" wait(3)
                if Correction.Text == "Correct" then 
                    Questions = math.random(1,3)
                end
            end 
        end)
    wait(1)
    end
end

Do I need to show more of the script for you guys to understand?

0
you can use "break" to stop any kind of loop. More info on the wiki lukeb50 631 — 7y
0
hooray someone who knows how to indent properly hiimgoodpack 2009 — 7y
0
lol rilgundam 65 — 7y
0
I indented on my question hiimgoodpack :) rilgundam 65 — 7y

Answer this question