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 9 years ago
if #contestants >= 2 then
            print("Enough players detected! Starting game soon.")
            break
        else
            print("Not enough players.")
        end
    end

    --load a random map 
    wait(2)
    mapholder:ClearAllChildren()
    wait(2)
    local allmaps = maps:GetChildren()
    local newmap = allmaps[math.random(1,#allmaps)]
    newmap.Parent = game.Workspace
    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 — 9y

Answer this question