So what this script is when player joins game and checks its team it should give him shirt and pants of the team's color but it does not and if he changes teams it should give clothes on the teams color..
game.Players.PlayerAdded:connect(function(Plr)
Plr.CharacterAdded:connect(function(Char)
for i,v in pairs(Char:GetChildren()) do
if v.ClassName == "Shirt" or v.ClassName == "Pants" then
v:Destroy()
end
end
if Plr.TeamColor == BrickColor.new("Brick yellow") then
x = Instance.new("Shirt",Char)
x.ShirtTemplate = "132601095"
else
x = Instance.new("Shirt",Char)
x.ShirtTemplate = "132601106"
end
end)
end)
whats the prob ?

2 comments
How do i even test it ? Since Players in studio are without clothes
The test in studio does give players clothes; you could also try publishing the game and trying online.