local selected = {}
mouse.Button1Down:Connect(function()
local team = game.Workspace:WaitForChild(player.TeamColor.Name)
if team then
if mouse.Target:IsDescendantOf(team) then
table.insert(selected,mouse.Target.Parent)
print(unpack(selected))
end
end
end)
Basically if what is selected is member of team it inserts it into the table but when you select it again it inserts a second copy into the table. How can I see if its already in the table? thanks.

4 comments
Thx
Did it work?
Did it work?
Sorry for not replying. It worked great!