Im trying to convert number 20 to 100, like a scale. 20 is the ammount of bullets, and 100 is the length of the GUI Box, but how do i scale the 20 to 100. So if i had 50 it would go to 100. For example :
0 is no ammo ( length ) = 0 bulelts
100 is full ammo ( length ) = 20 bullets
So if maximum bullets = 20, and minimum = 0, you can get a percent value by doing (currentBullets / maximumBullets) * 100. An example of this would be currentBullets = 10, you’d do (10/20) * 100, giving you 50, or 50%.