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 » Scripting Helpers
Home Search
 

Re: Fractions.

Previous Thread :: Next Thread 
xPRESIDENTx is not online. xPRESIDENTx
Joined: 10 Jun 2011
Total Posts: 815
13 Apr 2013 08:27 PM
I need help with turning High numbers such as: 10 to 1, so if the number is 5 then it will make an output of 0.5, basically turning the value down. any help?
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
13 Apr 2013 08:28 PM
You mean bringing it back one?

Num/10 should do it.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
13 Apr 2013 08:48 PM
I'm playing around with metatables. . .

    local mTable = {
        __div = function( Table )
            local Quotients = {}
            for Index, Number in pairs( Table ) do
                Quotients[ Index ] = Number/10
            end
            return Quotients
        end
    }
     
    local Dividends = setmetatable( { 1, 5, 10 }, mTable)
    
    print( unpack( Dividends / 10 ) )

But like Dek said, you would just want to divide your number by ten, as that seems to be your constant.

(╯°□°)> KMXD
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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