basically when your attk increases your dmg is supposed to increase and do more damage to an enemyhumanoid why isn't this working?
wait(2)
Player = game.Players.LocalPlayer
P = script.Parent:WaitForChild("Animation")
char =Player.Character
RA = char["Left Arm"]
k = true
local attk=script.Parent.Parent.Combat.Value
local def = script.Parent.Parent.Defense.Value
local d=(attk/def)*10+1
local dmg=d/def
function onDamage(Part)
if k == true then
k = false
if script.Parent.Punch.Value == 4 then
if Part.Parent:FindFirstChild("Humanoid")~= nil then
Part.Parent.Humanoid:TakeDamage(dmg)
end
end
wait(2)
k = true
end
end
RA.Touched:connect(onDamage)
