I’m trying to make a script that changes your avatar’s torso color when you’re on different teams, for example if I’m on red team I would have a bright red torso color and my friend that is on blue team would have a Electric blue torso color but the script I made isn’t working:
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Team == game.Teams["Blu taeam"] then
character:WaitForChild("Torso").BrickColor = BrickColor.new("Electric blue")
elseif player.Team == game.Teams["Red taeam"] then
character:WaitForChild("Torso").BrickColor = BrickColor.new("Bright red")
elseif player.Team == game.Teams["Chowsing taeam"] then
character:WaitForChild("Torso").BrickColor = BrickColor.new("Fossil")
end
end)
end)
Maybe wait one second before changing the color, because the body color might override you changing it. He just spawned, and the bodycolors take some time to load.
Also make sure you spell things correctly, not sure if the team names were spelled correctly or not, but I don’t know what you exactly named them. Also remember what GalaxyGourmet said, clothing could be over the players torso, so it would be good to print something in there just to make sure your code works.
Okay, I’ll try that and also the things I didn’t spell like teams names correctly is on purpose but I made sure that everything outside the names was correctly spelt.