The bigger the Max HP the lesser the damage it adds

Hello! so ive been trying to make the total damage to the bigger the max hp, the lesser the damage it adds so for example an enemy with maxhp of 500 takes 30 damage/hit, but an enemy with 1000 maxhp takes 45 damage/hit that shouldve take 60 damage/hit (the script.Damage.Value is 0.03) sorry for bad english and thanks!

local TotalDamage = math.floor(script.Parent.Humanoid.MaxHealth * script.Damage.Value)
script.Parent.Humanoid.Health -= TotalDamage

if you want to make
500hp take 30 dmg
1000hp take 60dmg
2000hp take 120 dmg
then do

local TotalDamage = math.round(script.Parent.Humanoid.MaxHealth  /  16.666666666666668  )

no i mean i want to make the total damage to be less effective the bigger the enemys health is, like 500hp take 30 dmg and 1000 take 45 instead of 60 and so on

500hp taking 30 dmg

1000 taking 45 dmg.

You mean you want people to take more damage the higher than health?

If you want less effective damage the more health it would be

500hp 45 dmg

1000hp 30 dmg

So, which way are you looking for help with?

1 Like

i already solved it

local scalingFactor = 0.3
local TotalDamage = math.floor(script.Parent.Humanoid.MaxHealth * (script.Damage.Value * 10) * scalingFactor / (1 + script.Parent.Humanoid.MaxHealth / 100))	
1 Like