I tried to make a script that would change a player's torso based off of a player's team. But it would not work. First, I placed the script as a local script into the starter player, then I changed the entire script and made it into a regular script that didn't work out, so I took the script and placed it into the server script service, and it still, will not work. Help please. Here's my script.
game.Players.PlayerAdded:Connect(function(player) local team = player.Team local char = player.Character or player.CharacterAdded:Wait() local torso = char.Torso torso.BrickColor = team.TeamColor team:GetPropertyChangedSignal("TeamColor"):connect(function() torso.BrickColor = team.TeamColor end) end)
Use Body Colors:
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) repeat wait() until player.Team local team = player.Team local bodyColors = character:WaitForChild("Body Colors") bodyColors.TorsoColor = team.TeamColor player:GetPropertyChangedSignal("Team"):Connect(function() bodyColors = character["Body Colors"] team = player.Team bodyColors.TorsoColor = player.Team.TeamColor end) end) end)