Guest User

on touch cap remover

a guest
Mar 17th, 2021
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function onTouched(hit)
  2.  
  3. local Character = [[ Your Character Model ]]
  4.  
  5. local RemoveableCaps = {"Cap1", "Cap2", "Cap3"}
  6.  
  7. for Index, Child in ipairs(Character:GetChildren()) do
  8. if table.find(RemoveableCaps, Child.Name) then
  9. Child:Destroy()
  10. end
  11. end
  12. end
  13.  
  14. script.Parent.Touched:connect(onTouched)
  15.  
Advertisement
Add Comment
Please, Sign In to add comment