RandomLuaScripter

[ROBLOX] Kill Block Script for Obbys

Feb 9th, 2018
9,252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. -- WARNING: Be sure to make this a Script and place it in any Part if you want it to work!
  2.  
  3. function onTouch(part)
  4. local humanoid = part.Parent:FindFirstChild("Humanoid")
  5. if (humanoid ~= nil) then -- if a humanoid exists, then
  6. humanoid.Health = 0 -- damage the humanoid
  7. end
  8. end
  9.  
  10. script.Parent.Touched:connect(onTouch)
Advertisement
Add Comment
Please, Sign In to add comment