Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am attempting to convert a whole number into a percentage?[SOLVED]

Asked by 5 years ago
Edited 5 years ago

I am trying to convert the number 1 to a percentage, or any number in between 1 and 0 for that matter. See I have a wave completion GUI at the top of my GUI and I am trying to get it to show percentage of the wave complete.

What I do at the moment is divide EnemiesLeft/MaxEnemyCount and that gives me the numbers I need. The part that I am confused about is the math.

I would -1 from the number right? And then do math.abs to convert it back to a positive number and then move the number 2 places to the left for the decimal. How would I add the decimal part?

0
Number * 100 1TheNoobestNoob 717 — 5y

Answer this question