I wan't to make it so that the less blood you have, the less damage you deal. If your blood is at 100%, you deal normaI damage. I was thinking of using a percentage to do this.
I was thinking of something like this.
Humanoid:TakeDamage(dmg / %ofblood)
but honestly I don't know how i'd be able to do this. %ofblood would be the current percentage of blood you have, like 20% or 50% of 100%, and dmg would be the damage, humanoid is the player your hitting.
Any and all help is appreciated!
local percentofblood = 100 local damage = 10 local dmg = damage/100 * percentofblood --Humanoid as in the victim you've hit Humanoid:TakeDamage(dmg)
Basically what this does, is that it divides it by one hundred, and multiplys it by the percentage of blood. If its 99% of blood, itll become slightly lower. If its 50%, it'll become half. If its 25%, 20% and 10%, it will become 1/4, 1/5, and 1/10 of damage, respectively. Hope this helps!