I'm trying to make a script allowing certain hats to stay but the rest to best destroyed. Code:
for i,v in next,game.Players:getChildren() do
for o,b in next,v.Character:getChildren() do
if b.className=="Hat" then
b:Destroy()
keepHats={"name","name"}
do
local keepHat=false
for _,v in next,keepHats do
if v==b.Name then
keepHat=true
end
end
if keepHat==false then
b:Destroy()
end
end
end
end
end
