SHOW:
|
|
- or go back to the newest paste.
1 | - | --Note that this is a template that I'm uploading. You can use this if you want to. |
1 | + | PARTNAMEHERE.Touched:Connect(function(hit) |
2 | - | --Replace PARTNAMEHERE with your part that you want to make a hitbox with. |
2 | + | local humn = hit.Parent:FindFirstChildOfClass("Humanoid") |
3 | - | --iiJoeCats |
3 | + | if humn and humn.Health > 0 then |
4 | - | |
4 | + | if hit:IsDescendantOf(character) then return end |
5 | - | PARTNAMEHERE.Touched:Connect(function(hit) |
5 | + | local suspect = humn.Parent |
6 | - | local humn = hit.Parent:FindFirstChildOfClass("Humanoid") |
6 | + | if suspect then |
7 | - | if humn and humn.Health > 0 then |
7 | + | local val = suspect:FindFirstChildOfClass("BinaryStringValue") |
8 | - | local suspect = humn.Parent |
8 | + | if not val then |
9 | - | if suspect then |
9 | + | Instance.new("BinaryStringValue",suspect).Name = "namehere" --Any name you want |
10 | - | local val = suspect:FindFirstChildOfClass("BinaryStringValue") |
10 | + | wait(1) |
11 | - | if not val then |
11 | + | suspect:FindFirstChildOfClass("BinaryStringValue"):Destroy() --I don't know why I put this in here. |
12 | - | Instance.new("BinaryStringValue",suspect).Name = "namehere" --Any name you want |
12 | + | else |
13 | - | wait(1) |
13 | + | --nothing |
14 | - | suspect:FindFirstChildOfClass("BinaryStringValue"):Destroy() --I don't know why I put this in here. |
14 | + | end |
15 | - | else |
15 | + | end |
16 | - | --nothing |
16 | + | end |
17 | - | end |
17 | + |