Advertisement
OwenBLOXs

Hat Remover Script:

Jun 5th, 2018
3,502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. --How to make a Hat Remover Script
  2.  
  3. --Credit: OwenBLOXs YouTube @ https://www.youtube.com/channel/UCZYzTtIPHGvMGkHOhR2WQQA?view_as=subscriber, and RBX: xXTimeZeroXx
  4.  
  5. --This goes into the Script
  6.  
  7. function onTouched(hit)
  8. local d = hit.Parent:GetChildren()
  9. for i=1, #d do
  10. if (d[i].className == "Accessory") then d[i]:remove()
  11. end
  12. end
  13. end
  14.  
  15. script.Parent.Touched:connect(onTouched)
  16.  
  17. --Tip: If you're making a custom character and you want to remove the hats so it doesn't get in your way, place the Script into the SpawnLocation. This makes it so that players spawn without hats/accessories.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement