Advertisement
iiJosephCats205

My Hitbox Script.

Nov 15th, 2019
1,132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. --Note that this is a template that I'm uploading. You can use this if you want to.
  2. --Replace PARTNAMEHERE with your part that you want to make a hitbox with.
  3. --iiJoeCats
  4.  
  5. PARTNAMEHERE.Touched:Connect(function(hit)
  6.                 local humn = hit.Parent:FindFirstChildOfClass("Humanoid")
  7.                 if humn and humn.Health > 0 then
  8.                     local suspect = humn.Parent
  9.                     if suspect then
  10.                         local val = suspect:FindFirstChildOfClass("BinaryStringValue")
  11.                         if not val then
  12.                             Instance.new("BinaryStringValue",suspect).Name = "namehere" --Any name you want
  13.                             wait(1)
  14.                             suspect:FindFirstChildOfClass("BinaryStringValue"):Destroy() --I don't know why I put this in here.
  15.                         else
  16.                             --nothing  
  17.                         end
  18.                     end
  19.                 end
  20.             end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement