Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make punching damage increase according to leaderstats? [closed]

Asked by 6 years ago

This is the damage script inside of the punch.

01script.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
10end)
0
Leaderstats name is "Pounds" ChefDevRBLX 90 — 6y
0
Try the new one. CaptainD_veloper 290 — 6y
0
Thank you so much! ChefDevRBLX 90 — 6y

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?

1 answer

Log in to vote
-1
Answered by 6 years ago
Edited 6 years ago

Use this script:

01script.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
07local 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
13end)
0
It is not working, any way to fix it.? ChefDevRBLX 90 — 6y
0
Wait, Is there any way i can make it do random damage? like 1 through 30 damage ChefDevRBLX 90 — 6y
0
Yes, let me fix that. CaptainD_veloper 290 — 6y
0
-1. No explanation was given. User#24403 69 — 6y
Ad