I'm making a new game and I need to sort people into teams. I tried to do it already but it didn't work... Could I have some help with how I can possibly make this happen? This is the script :
--Made by KordGamer
--Varibales--
Text = game.Lighting.Text
Maps = {"Testing", "Testing 2"}
NumMaps = 2
--------------
--------Script--------
---game.Players.NumPlayers < 2
if game.Players.NumPlayers > 1 then
Text.Value = "Oh no! There is not enough players to continue..."
else
Text.Value = "Welcome to the game! A new game is starting in a couple of seconds..."
wait(10)
Text.Value = "Picking map..."
wait(2)
RandomChoice = math.random(1, NumMaps)
CurrentMap = Maps[RandomChoice]
ChosenMap = game.ServerStorage:FindFirstChild(CurrentMap)
ChosenMap:clone().Parent = game.Workspace
ChosenMap.Name = "Map"
Text.Value = "The map selected is : "..CurrentMap.."!"
wait(3)
Text.Value = "Preparing your spawn areas..."
wait(2)
Text.Value = "Sorted! Joining round..."
wait(2)
wait(2)
for i = 40, 0, -1 do
Text.Value = "Time left : "..i.." seconds"
wait(1)
end
if Text.Value == "Time left : 0 seconds" then
Text.Value = "Round over! Well done!"
wait(5)
Text.Value = "Resetting game..."
wait(2)
_G:Restart()
end
end

1 comment
I do not see your attempt, and you need to be specific when you say "Sort Teams"