|
| 28 Sep 2015 05:47 PM |
So, I've been making a health GUI, and it displays the amount of health in numbers at the bottom of the bar. The bar is nice and working, same as the health/maxhealth in numbers, but the health is always in huge decimals, i.e "57.39562893/100" and it makes the text small and hard to see, which is not very eye attractive to players.
I have indeed come up with an alternate solution. I would like to know if this would work or not: Have an updating IntValue of the humanoids health, and the IntValue would automatically round the number to a whole because it doesn't allow decimals, and in the script, instead of having "health/maxhealth", it could be "intvalue/maxhealth".
Even if this solution does work, I'm curious as to how I would be able to round a number to the nearest whole in a script.
Answers are greatly appreciated, thanks in advance! |
|
|
| Report Abuse |
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 28 Sep 2015 05:49 PM |
math.floor, math.ceil
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|