Defense Formula Stopped Working?

Hi, i am trying out this defense formula i’ve found before on this post

Howhever, When i try the same calculation from the post, it should give me 25 Incoming Attack, this is what i have, i remember it was working the last time i used this formula

local baseAtk = 50

local DEF = 50
local ATK = baseAtk/(baseAtk + DEF)
print(ATK)

this gives me 0.5 incoming attack, when it should give me 25?, i am not good at maths but something seems off

what you are doing is 50/100 which does come out to 0.5 what is the end goal you want to achieve?

The correct formula for incorporating a damage dampener based on a defence percentage is:

local damage = baseDamage * (1 - defence / maxDefence)