I currently have a StarterCharacter model in the StarterPlayer folder to change the appearance of each player when they spawn. The StarterCharacter is wearing a hat. I would like the hat to be destroyed once the player spawns in IF they are on a certain team.
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
If Char:FindFirstChild("Hat") and Player.Team == game.Teams.Team then
Char.Hat:Destroy()
end
end)
end)