|
| 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 |
|
|
|
| 21 May 2017 06:27 AM |
local function percentage(percentage, number) return (percentage/100)*number end
print(percentage(50, 100)) |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 May 2017 06:29 AM |
@jordan
Yes, that is a way to do it too. |
|
|
| Report Abuse |
|
|
|
| 21 May 2017 06:29 AM |
@Snowskateer
some absolute beginner could |
|
|
| Report Abuse |
|
|
|
| 21 May 2017 06:30 AM |
he really couldnt, its just basic maths a beginner won't be using percentage either so
|
|
|
| Report Abuse |
|
|
|
| 21 May 2017 06:31 AM |
@Snowskateer
this would teach a beginner to use math in LUA |
|
|
| Report Abuse |
|
|
|
| 21 May 2017 06:32 AM |
except that the actual operation has nothing to do with rblx lua...
|
|
|
| Report Abuse |
|
|
|
| 21 May 2017 06:33 AM |
@Snow
why are you even mad? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 21 May 2017 06:35 AM |
@Snow
"waste of a post"
there is no post limit, you're an idiot |
|
|
| Report Abuse |
|
|
|
| 21 May 2017 06:36 AM |
this 'idiot' is more than likely a better scripter than you
|
|
|
| Report Abuse |
|
|
|
| 21 May 2017 06:38 AM |
this is just math tho
also percentage/100 * number might be better for clarity |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 21 May 2017 07:07 AM |
No it was for my math test on percentages
|
|
|
| Report Abuse |
|
|