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
 

Percentage calculator

Previous Thread :: Next Thread 
TurtleAndLion is not online. TurtleAndLion
Joined: 01 Mar 2012
Total Posts: 4248
21 May 2017 06:25 AM
If you are new to scripting, you can learn from this :)

This is a very simple percentage calculator that prints the "percentage" of the "number" you put in.

number = 35
percentage = 50

print(percentage * number / 100)
Report Abuse
jordan0810 is not online. jordan0810
Joined: 03 Jun 2012
Total Posts: 846
21 May 2017 06:27 AM
local function percentage(percentage, number)
return (percentage/100)*number
end

print(percentage(50, 100))
Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
21 May 2017 06:28 AM
you can't learn from this
Report Abuse
TurtleAndLion is not online. TurtleAndLion
Joined: 01 Mar 2012
Total Posts: 4248
21 May 2017 06:29 AM
@jordan

Yes, that is a way to do it too.
Report Abuse
TurtleAndLion is not online. TurtleAndLion
Joined: 01 Mar 2012
Total Posts: 4248
21 May 2017 06:29 AM
@Snowskateer

some absolute beginner could
Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
21 May 2017 06:30 AM
he really couldnt, its just basic maths
a beginner won't be using percentage either so
Report Abuse
TurtleAndLion is not online. TurtleAndLion
Joined: 01 Mar 2012
Total Posts: 4248
21 May 2017 06:31 AM
@Snowskateer

this would teach a beginner to use math in LUA
Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
21 May 2017 06:32 AM
except that the actual operation has nothing to do with rblx lua...
Report Abuse
TurtleAndLion is not online. TurtleAndLion
Joined: 01 Mar 2012
Total Posts: 4248
21 May 2017 06:33 AM
@Snow

why are you even mad?
Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
21 May 2017 06:34 AM
i'm not mad, just saying that this was a waste of a post and won't help anyone
Report Abuse
TurtleAndLion is not online. TurtleAndLion
Joined: 01 Mar 2012
Total Posts: 4248
21 May 2017 06:35 AM
@Snow

"waste of a post"

there is no post limit, you're an idiot
Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
21 May 2017 06:36 AM
this 'idiot' is more than likely a better scripter than you
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 May 2017 06:38 AM
this is just math tho

also percentage/100 * number might be better for clarity
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
21 May 2017 06:57 AM
Technically if Roblox goes away or we all die eventually, there is a post limit.
Get your 100k'th post before you're too old to breathe!


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
21 May 2017 06:58 AM
Also doesn't everybody learn this in grade-school when they need to calculate whether they got an A or a B on their butterfly anatomy quiz?


Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
21 May 2017 07:07 AM
No it was for my math test on percentages


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