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)

1 comment

0

Whatever variable represents how much damage it does, just change it to the Strength Value of the player.