I’m trying to make accuracy by taking the amount of correct moves and the amount of attempted moves, I searched it up online and found the formula for it (correctMoves.Value * 100 / AttemptedMoves.Value) and that did not work.
The math is incorrect, how it works is that you got the hit amount, and the total amount of hits, you divide the hit amount by the total amount of hits and it gives you a range between 0 and 1, you then multiply that by a 100 to then give you a 0 to 100 range
Math: (hitAmount.Value / totalHits.Value) * 100
Example:
You’ve got 50 correct hits out of 100 hits
(50 / 100) * 100
Now 50 divided by a hundred is equal to 0.5, when you multiply that by 100, you get 50.
I’ve said hits instead of moves because i thought this was for a shooter game, but dw, it works the same way