Okay, so if I have all the player's names split into two separate teams, how would I access them to split the players that are inside each of the tables to their teams?
COMMUNITY QUESTION
How would I split players from a table into teams?
1 answer
local team1 = {}
local team2 = {}
for key,value in ipairs(team1) do
if game.Players:FindFirstChild(value) == nil then return end
game.Players:FindFirstChild(value).TeamColor = game.Teams.Team1.TeamColor
end
for key,value in ipairs(team2) do
if game.Players:FindFirstChild(value) == nil then return end
game.Players:FindFirstChild(value).TeamColor = game.Teams.Team2.TeamColor
end
This should work I believe...
This discussion is preserved as it was. New answers, comments, and votes are closed.
