generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

How can I make a GUI print a double?

Previous Thread :: Next Thread 
177117 is not online. 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 is not online. 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 is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
16 Apr 2017 08:30 PM
gui.Text = nv.Value


Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
16 Apr 2017 08:33 PM
So would it be NumberValue.nv.Value?
Report Abuse
Borsy is not online. Borsy
Joined: 31 Jul 2014
Total Posts: 15111
16 Apr 2017 08:36 PM
print(tostring(numberValue.Value))
Report Abuse
chimmihc is not online. 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 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
16 Apr 2017 08:48 PM
Ok thank you!
Report Abuse
177117 is not online. 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 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
16 Apr 2017 09:19 PM
bump
Report Abuse
Borsy is not online. 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 is not online. 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
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image