game.Players.PlayerAdded:connect(function(Plr)
Plr.CharacterAdded:connect(function(Char)
local Contents = Char:GetChildren()
for _, v in pairs(Contents) -- Remove all existing hats to add new one(s)
if v:IsA("Hat") then
v:remove()
end
end
if Plr.TeamColor == BrickColor.new("Really blue") then -- Check the team Color
local Hat1 = game.ServerStorage:Clone()
Hat1.Parent = Char
elseif Plr.TeamColor == BrickColor.new("Really red") then
local Hat2 = game.ServerStorage:Clone()
Hat2.Parent = Char
end
end)
end)
(It's supposed to give players a different hat when they're on a certain team, but I can't get it to work.)

5 comments
So I would fix this by saying: local Hat1 = game.ServerStorage.Hat1:Clone()? Would that work?
Yes
Still not working :/
local Hat2 = game.ServerStorage:Clone()-- that one too
I did.....