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

Why does my script continuously spawn maps?

Asked by 10 years ago
01if #contestants >= 2 then
02            print("Enough players detected! Starting game soon.")
03            break
04        else
05            print("Not enough players.")
06        end
07    end
08 
09    --load a random map
10    wait(2)
11    mapholder:ClearAllChildren()
12    wait(2)
13    local allmaps = maps:GetChildren()
14    local newmap = allmaps[math.random(1,#allmaps)]
15    newmap.Parent = game.Workspace
16    wait(2)

All variables are defined, don't worry about that. I'm not getting any errors, either. It just keeps spawning more than one map even after I have broken out of the loop to go to the next section of code.

What is the problem?

Please explain your answer. Help is vital.

0
Could you show a little bit more of the script. I still don't quite know what you are talking about. woodengop 1134 — 10y

Answer this question