Cloning into a table?
It's supposed to clone the children of Officer into the players that are cops.
Help would be appreciated
04 | local Officer = game.Workspace.Characters.Officer:GetChildren() |
06 | local Players = game.Players:GetChildren() |
08 | for i,v in pairs (Players) do |
09 | table.insert(Hunters,v) |
12 | function chooseRandomPlayer(fromTeam,toTeam) |
13 | local randomPlayer = nil |
15 | randomPlayer = fromTeam [ math.random( 1 ,#fromTeam) ] |
17 | table.insert(toTeam,randomPlayer) |
18 | for i,v in pairs (Players) do |
19 | if v.Name = = randomPlayer.Name then |
20 | for z,b in pairs (Players) do |
21 | if (b.className = = "Hat" ) or (b.className = = "CharacterMesh" ) or (b.className = = "Shirt" ) or (b.className = = "Pants" ) or (b.className = = "ShirtGraphic" ) then |
28 | table.remove(fromTeam,i) |
32 | chooseRandomPlayer(Hunters, Cops) |