Advertisement
EapelRen

Hitbox Script

Jan 13th, 2022
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local hitbox = script.Parent:WaitForChild("Hitbox") or script.Parent:FindFirstChild("Hitbox")
  2.  
  3. repeat wait() until #hitbox:GetChildren() == 6
  4.  
  5. for _,c in pairs(hitbox:GetChildren()) do
  6.     c.Touched:Connect(function(touch)
  7.         if not touch:FindFirstChild("kills") then return end
  8.         local h = script.Parent:FindFirstChild("Humanoid")
  9.         if not h then return end
  10.         if h.Health == 0 then return end
  11.         h.Health = 0
  12.     end)
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement