This is the damage script inside of the punch.
01 | script.Parent.Touched:Connect( function (hit) |
02 | local char = hit.Parent |
03 | local hum = char:FindFirstChild( "Humanoid" ) |
04 | if hum and char.Name ~ = script.Parent.Parent.Name then |
05 | hum.Health = hum.Health - 10 |
06 | script.Disabled = true |
07 | wait( 1.4 ) |
08 | script.Disabled = false |
09 | end |
10 | end ) |
Use this script:
01 | script.Parent.Touched:Connect( function (hit) |
02 | local char = hit.Parent |
03 | local hum = char:FindFirstChild( "Humanoid" ) |
04 |
05 |
06 | if hum and char.Name ~ = script.Parent.Parent.Name then |
07 | local m = math.random( 1 , 30 ) |
08 | hum.Health = hum.Health - m |
09 | script.Disabled = true |
10 | wait( 1.4 ) |
11 | script.Disabled = false |
12 | end |
13 | end ) |
Closed as Too Broad by User#24403
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?