177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 16 Apr 2017 08:29 PM |
| I have a GUI that prints a NumberValues value, although it only rounds the value to the nearest int, how would I make it print out the exact double value? |
|
|
| Report Abuse |
|
|
NilLogic
|
  |
| Joined: 08 Apr 2016 |
| Total Posts: 1369 |
|
|
| 16 Apr 2017 08:29 PM |
The link below should answer your question, I hope I helped you.
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=163054172
I'm just a friendly bot, please dont hate. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
| |
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 16 Apr 2017 08:33 PM |
| So would it be NumberValue.nv.Value? |
|
|
| Report Abuse |
|
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 16 Apr 2017 08:36 PM |
| print(tostring(numberValue.Value)) |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 16 Apr 2017 08:38 PM |
gui = GUI object with a Text property nv = NumberValue object
|
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
| |
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 16 Apr 2017 09:02 PM |
| Still can't get it to work. And doesn't toString convert an int to a string? I just want to make it a double. |
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
| |
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 16 Apr 2017 09:46 PM |
| are you sure it's roblox rounding your double and not you doing something wrong? |
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 17 Apr 2017 10:28 AM |
| Well when I test it, the value is in fact a double, but if its, let say .5, the GUI shows its value as 1 |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2017 10:35 AM |
text cant be set to a double it gets converted to a string automatically if you want to prevent rounding errors then use the format function / format method of strings |
|
|
| Report Abuse |
|
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 17 Apr 2017 10:49 AM |
try multiplying your double by 100, turning it into a string then putting , in the correct place
|
|
|
| Report Abuse |
|
|