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

Why Doesn't this play a countdown right after the map spawns?

Asked by 8 years ago
Edited 8 years ago

This is a server script inside of serverscriptservice.

01--[[
02    CONTROLS ROUNDS
03    BY CHEEKYSQUID
04    DO NOT DELETE
05--]]
06 
07local replicatedstorage = game:GetService("ReplicatedStorage")
08local status = replicatedstorage:WaitForChild('StatusValue')
09 
10while true do
11--Intermission section
12for i = 2,0,-1 do
13    status.Value = "Intermission: ".. i
14    wait(1)
15end
View all 59 lines...

It should go 3 2 1 GO! and then the 90,0,-1 do should play but it skips the 3 2 1 GO!

The part that is not working is

1for i = 3,0,-1 do
2                if i > 3 then
3                    status.Value = i
4                    wait(1)
5                else
6                status.Value = "GO!"
7                end

1 answer

Log in to vote
0
Answered by
Omarstein 100
8 years ago
1for i = 3,0,-1 do
2    if i <= 3 and i > 0 then  -- check if "i" is less or equal to 3 and more than 0
3        status.Value = i
4        wait(1)
5    else
6        status.Value = "GO!"
7    end
8end
Ad

Answer this question