I made an armor system and each armor has a defence value.
So everytime a player gets damaged, the damage dealt will be calculated depending on the defence of the armor but I have no idea how could I calculate this so I want to ask if someone has an idea about doing this?
I meant calculating the damage the player gets whenever another player or an enemy damages them by taking account the defence the armor has
It has nothing to do with the armor’s durability
if the defense level is counts as the armor’s toughness, u can use it by dividing the damage rate by the defense level, for example, the armor has 9 defense levels and the damage is about 60 which will only give us 6 which the health, although with this way u need to keep track to the player’s last health before they took the damage if u have all of that u can use the 6 from the result and basically remove 6 from the last health, example the player has 70 health before they took damage and after calculations u got 6 and just do 70 - 6, to be sure I not really experienced with making armor defense system so u could try another way if u would like to
Whenever you’re dealing damage to a player’s humanoid instance just negate from the damage dealt however much damage the armor (protection) should provide, this can be a simple numerical deduction like reducing the damage dealt by 10 or 20, or a magnitude such as decreasing the damage dealt by a divisor of 2 (halve the amount of damage received).