Okay so I have a huge problem and its aggravating me… Probably something stupid and easy but I cant seem to figure the SOAB out. So you see here I have the PlayerScaleDamage function which is called when a player takes damage by default of the function. So it scales the damage the player takes based on which limb they are hit in. Well in my code I have all areas set to 0.50 which is half the damage received. Well all of the areas give different damages. they should all be the same. What am I doing wrong?
function ScaleDamage(ply, hitgroup, dmginfo) if (hitgroup == HITGROUP_HEAD) then dmginfo:ScaleDamage(0.50) end if (hitgroup == HITGROUP_CHEST) then dmginfo:ScaleDamage(0.50) end if (hitgroup == HITGROUP_LEFTARM || hitgroup == HITGROUP_RIGHTARM) then dmginfo:ScaleDamage(0.50) end if (hitgroup == HITGROUP_LEFTLEG || hitgroup == HITGROUP_RIGHTLEG) then dmginfo:ScaleDamage(0.50) ply:SetWalkSpeed(125) ply:SetRunSpeed(250) timer.Simple(2.25, function() ply:SetWalkSpeed(250) ply:SetRunSpeed(500) end) end end hook.Add("ScalePlayerDamage","ScaleDamage",ScaleDamage)