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

How would I make players with more Strength do more damage?

Asked by 4 years ago
Edited 4 years ago

Hi, I am in the process of making a Weight Lifting Simulator. I am trying to figure out the best way to make it so the more strength you have, the more damage you do when punching. The code is put in a normal script inside the Handle in the tool.

local plr = game.Players.LocalPlayer
local strength = plr.leaderstats.Strength.Value
local debounce = true
script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild('Humanoid')then
        local h = hit.Parent.Humanoid
        if debounce == true then
            h.Health = strength
            debounce = false
            wait(1)
            debounce = true
        end
        end
end)
0
Whatever variable represents how much damage it does, just change it to the Strength Value of the player. cookie_more 30 — 4y

Answer this question