In reality I want that is the player is not in the red team weapons with a marker "Terrorist" this destroys, how to make this? How to fix my script?
workspace.ChildAdded:connect(function(object)
local NewPlayer = game.Players:playerFromCharacter(object)
if NewPlayer then
if NewPlayer.TeamColor == BrickColor.new("Bright red") then
else
for i,AllGear in pairs(NewPlayer.Backpack) do
for i,v in pairs(AllGear) do
if v:FindFirstChild("terroriste") then
v:Destroy()
end
end
end
end
end
end)

3 comments
Omg i'm really stupid....Thank you very much for your help I appreciate it enormously!
What changes did you make? I see the fix, but the OP may not; could you point it out for future reference, and explain what it does?
Thanks for the input Stigma. The change I made was I added :GetChildren() to both AllGear and Backpack on lines 06 and 07.