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

How would I make a countdown gui counting down minutes and seconds of my choice?

Asked by 4 years ago

Hi, i'm trying to make a countdown gui for my game. My game is meant to be some space ship. I want to make the gui for a self destruct sequence.

Heres my script, I am not that good with countdown gui's however. Extremely bad code in my opinion.

local minute = 3
local second = 59
workspace.C1:Play()
workspace.C2:Play()
for i = 1,60 -1 do
    workspace.CBeep:Play()
    script.Parent.Value = "02:" .. i
    if i == 0 then
        for o = 1,60 -1 do
            script.Parent.Value = "01:" .. o
            if o == 0 then
                for p = 1,60 -1 do
                    script.Parent.Value = "00:" .. p
                    if p == 0 then
                        workspace.C1:Stop()
                        workspace.C2:Stop()
                        workspace.CBeep:Stop()
                    end

                end
            end
        end
    end
end


Answer this question