It's supposed to clone the children of Officer into the players that are cops. Help would be appreciated
local Hunters = {} local Cops = {} local Officer = game.Workspace.Characters.Officer:GetChildren() local Players = game.Players:GetChildren() for i,v in pairs(Players) do table.insert(Hunters,v) end function chooseRandomPlayer(fromTeam,toTeam) local randomPlayer = nil repeat randomPlayer = fromTeam[math.random(1,#fromTeam)] until randomPlayer table.insert(toTeam,randomPlayer) for i,v in pairs(Players) do if v.Name == randomPlayer.Name then for z,b in pairs(Players) do if (b.className == "Hat") or (b.className == "CharacterMesh") or (b.className == "Shirt") or (b.className == "Pants") or (b.className == "ShirtGraphic") then b:Remove() end if Cops then Officer.Parent = Cops end end table.remove(fromTeam,i) end end end chooseRandomPlayer(Hunters, Cops)
Try this in place of lines 24-26:
for _, cop in Cops do for _, bit in Officer do bit:Clone().Parent = cop end end