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 5 years ago

This is the damage script inside of the punch.

script.Parent.Touched:Connect(function(hit)
    local char = hit.Parent
    local hum = char:FindFirstChild("Humanoid")
    if hum and char.Name ~= script.Parent.Parent.Name then
        hum.Health = hum.Health - 10
        script.Disabled = true
        wait(1.4)
        script.Disabled = false
    end
end)
0
Leaderstats name is "Pounds" ChefDevRBLX 90 — 5y
0
Try the new one. CaptainD_veloper 290 — 5y
0
Thank you so much! ChefDevRBLX 90 — 5y

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 5 years ago
Edited 5 years ago

Use this script:

script.Parent.Touched:Connect(function(hit)
    local char = hit.Parent
    local hum = char:FindFirstChild("Humanoid")


    if hum and char.Name ~= script.Parent.Parent.Name then
local m = math.random(1,30)
        hum.Health = hum.Health - m
        script.Disabled = true
        wait(1.4)
        script.Disabled = false
    end
end)
0
It is not working, any way to fix it.? ChefDevRBLX 90 — 5y
0
Wait, Is there any way i can make it do random damage? like 1 through 30 damage ChefDevRBLX 90 — 5y
0
Yes, let me fix that. CaptainD_veloper 290 — 5y
0
-1. No explanation was given. User#24403 69 — 5y
Ad