So what I am trying to do, is to make it for when your team changes, your torso color, along with your hat color will change. I have reused a script from the past, and all of a sudden, it just does not work. Please help. There are no errors. Here's my code.





game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		repeat wait() until player.Team ~= nil
		local team = player.Team
		local bodyColors = character:WaitForChild("Body Colors")
		bodyColors.TorsoColor = team.TeamColor
		local hat = character:WaitForChild("Hat")
		hat.Handle.BrickColor = team.TeamColor
		player:GetPropertyChangedSignal("Team"):Connect(function()
			local bodyColors = character:WaitForChild("Body Colors")
			bodyColors.TorsoColor = team.TeamColor
			local hat = character:WaitForChild("Hat")
			hat.Handle.BrickColor = team.TeamColor
		end)
	end)
end)