Hello first off this is a alt account.
local Team_One = {game.Teams.Stalker}
local Team_Two = {game.Teams.Survivor}
function shuffle(arr) --This was stolen from another DevForum post. I cannot remember where I got it from.
local arrCopy = {unpack(arr)}
for i = 1, #arr do
arr[i] = table.remove(arrCopy, math.random(#arrCopy))
end
return arr
end
local players = {}
for i,v in pairs(game.Players:GetPlayers()) do --Insert current players to table
table.insert(players, v.Name)
end
local randomPlayers = shuffle(players) --Randomize players table
for i = 1, math.ceil(#randomPlayers/2) do --Take half of the random players and put them into team 1
table.insert(Team_One, randomPlayers[i])
print(randomPlayers[i],"is in Team stalker") -- Prints What team the player is in
table.remove(randomPlayers, i)
end
for i, v in pairs(randomPlayers) do --Put the rest of the players into team 2
table.insert(Team_Two, v)
print(randomPlayers[i], "is in Team Two") --Prints what team the player is in
end
randomPlayers = {} --Reset table
So i have this placed in the ServerScriptService. And i have the 2 print in line 23 and 29. In the output it dose not print. It is a server script. Also i am new to scripting so i may not know what you mean. Thanks

2 comments
Please specify your exact problem.
The script is ot running when the game starts. I dose not randomize and it dose not print the line 23 and 29