game.Players.PlayerAdded:connect(function(plr)
for i,v in pairs(plr.Character:GetChildren())do
if v.ClassName == "Hat" or v.ClassName == "Accountrement" then
v:Destroy()
end
end
end)
i am trying to make a script that deletes all the hat player has when he joins the game but this script will not work please help.
