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

How to make a random Team Generator?

Asked by 10 years ago

Ok so I'm trying to make a game like deathrun, with 1 killer, and the rest runners, a random map is selected, and when you died you were taken to the lobby. Anyone know how or what I can add to this script to make it choose a random map first, then tp the killer to the killer spawn and runners to runner spawn??

unction checkRunnerNumber() 
    local count = 0
    local players = game.Players:GetChildren()
    for i=1,#players do
        if players[i].Character ~= nil then 
        if players[i].TeamColor == BrickColor.new("Bright blue") then
            count = count + 1
            game.Workspace.HintText.Value = " Runners alive: " ..count.. " "
            game.Workspace.DebugOutput.Value = "Game is running normal. Checking runners alive and time left."
        end
    end
end

Answer this question