local lplayer = game.Players.LocalPlayer
for k,s in pairs(lplayer) do if s:isA("Hat") and lplayer:isA("Humanoid") then s:Destroy() end end
I've done this so far, but it's not working, an help?
Basically all you want to do is loop through the player''s character to find a hat. This is how you will do this:
player = game.Players.LocalPlayer for i,v in pairs(player.Character:GetChildren())do if v:IsA("Hat") then v:Destroy() wait() end end
This will destroy all items that are a hat in the player's character