This script works but I have a problem with it. First of all, I would like an option to add more hats onto the character (maybe about 4-5 more) for each team. Also, I want to know how to remove all accessories for 100% of the times. Sometimes it works and other times, it leaves all the hats and adds the hat from the ServerStorage... Any help? Thanks!
game.Players.PlayerAdded:connect(function(Plr)
Plr.CharacterAdded:connect(function(Char)
wait(0.5)
local Contents = Char:GetChildren()
for _, v in pairs(Contents) do
if v:IsA("Accessory") then
v:remove()
end
end
if Plr.TeamColor == BrickColor.new("Bright blue") then
local Hat1 = game.ServerStorage.Hat1:Clone()
Hat1.Parent = Char
elseif Plr.TeamColor == BrickColor.new("Bright red") then
local Hat2 = game.ServerStorage.Hat2:Clone()
Hat2.Parent = Char
end
end)
end)

1 comment
It works, but do you know how to add more hats onto the characters?