Advertisement
ERROR_CODE

Beta damage block

Aug 27th, 2023 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local damagepart = Instance.new("Part")
  2. damagepart.Parent = game.workspace
  3. damagepart.Position = Vector3.new(164.288, 1, 172.363)
  4. damagepart.Size = Vector3.new(5,5, 5)
  5. Touched = false
  6.  
  7. damagepart.Touched:connect(function(hit)
  8. if Touched == false then
  9. Touched = true
  10.  
  11.     local human = hit.Parent:findFirstChild("Humanoid")
  12.     if (human ~= nil) then
  13.        
  14.         human.Health = human.Health - 5
  15.        
  16.     end
  17. Touched = false
  18. end
  19. end)
  20.  
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement