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
 

Re: How would you do this

Previous Thread :: Next Thread 
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
31 Aug 2015 11:52 AM
NumberValue's Value: 1.10000000000005 or etc..


How would I make this text's appear as that value but only this part:

Damage: 1.1

Not

Damage: 1.000000000005

Or

Damage: 1 (Using math.floor would do this)


Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
31 Aug 2015 12:05 PM
b
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
31 Aug 2015 12:09 PM
What do you mean? math.floor
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
31 Aug 2015 12:10 PM
Oh, maybe math.floor does work. :P

Sorry ;3.
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
31 Aug 2015 12:15 PM
TruncDamage = math.floor(Damage * 10) /10
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
01 Sep 2015 10:31 AM
Thanks BJ, but it didn't actually turn out to be a problem. The extra numbers after the first two (1.10000000000000) don't show up on the text. I guess cause they're zeros.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
01 Sep 2015 10:44 AM
Also nicely you can do this

string.format("%.1f",DAMAGE)

and it will give you back a string form of the damage with 1 decimal place. It also rounds for you.
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
01 Sep 2015 12:19 PM
Cool, thanks. :o
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