Advertisement
Guest User

Damage Script for roblox

a guest
Apr 22nd, 2019
23,485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. function onTouched(hit)
  2. local human = hit.Parent:findFirstChild("Humanoid")
  3. if (human ~= nil) then
  4. wait(1.5)
  5. human.Health = human.Health - 100
  6. wait(.5)
  7. end
  8. end
  9.  
  10. --if (script.Parent ~= nil) and (script.Parent.className == "Part") then --Work if in a block
  11. -- connection = script.Parent.Touched:connect(onTouched)
  12. --end
  13. script.Parent.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement