Now, It's a simple question. I just need help how to.
What Shawnyg said should work.
I'll give you another way to do what you want to do.
function removehats() for i, v in pairs(game.Players:GetChildren()) do wait() for i, t in pairs(v.Character:GetChildren()) do if t:IsA("Hat") then t:Destroy() end end end end while true do wait(2) removehats() end
I apologize for the spacing as I just did this without studio
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(char) for i,v in pairs(char:GetChildren()) do if v:IsA("Hat") then v:Destroy() end end end) end)