Investive
|
  |
| Joined: 13 Jun 2013 |
| Total Posts: 80 |
|
|
| 19 May 2016 05:47 PM |
| If i want to make a value shown in a gui and if that value let's say turns to 1100 then how can i make it so when I shorten it with divide by 1000 I get 1.1 instead of 1 |
|
|
| Report Abuse |
|
|
| |
|
Investive
|
  |
| Joined: 13 Jun 2013 |
| Total Posts: 80 |
|
|
| 19 May 2016 05:51 PM |
| Im saying 1100/1000 not 1100/1100 |
|
|
| Report Abuse |
|
|
|
| 19 May 2016 05:52 PM |
example:
HealthPercent=Health/Maxhealth
Gui.Size=UDim2.new(HealthPercent/10,0,0.1,0) |
|
|
| Report Abuse |
|
|
|
| 19 May 2016 05:56 PM |
math.floor(1100/1000)
#code mod = require(sike) if not mod.xThe[...] then print("You're not RbxDev yet..") end |
|
|
| Report Abuse |
|
|
Investive
|
  |
| Joined: 13 Jun 2013 |
| Total Posts: 80 |
|
|
| 19 May 2016 06:00 PM |
| the value will not always be 1100 it could be anything not just 1100 plus I think 1100/1000 wouldn't come out as 1.1 (it comes out as 1 for me) |
|
|
| Report Abuse |
|
|
|
| 19 May 2016 06:01 PM |
x = number/number math.floor(x)
#code mod = require(sike) if not mod.xThe[...] then print("You're not RbxDev yet..") end |
|
|
| Report Abuse |
|
|
Investive
|
  |
| Joined: 13 Jun 2013 |
| Total Posts: 80 |
|
|
| 19 May 2016 06:21 PM |
| it does not work. number/number doesn't work it just returns with the number without decimals |
|
|
| Report Abuse |
|
|
|
| 19 May 2016 06:22 PM |
What are you trying to ask..
#code mod = require(sike) if not mod.xThe[...] then print("You're not RbxDev yet..") end |
|
|
| Report Abuse |
|
|
Investive
|
  |
| Joined: 13 Jun 2013 |
| Total Posts: 80 |
|
|
| 19 May 2016 06:23 PM |
| 1100/1000 is not 1 right? I want it to return with 1.1 instead of just 1. (The numbers are examples) |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 19 May 2016 06:24 PM |
1100 / 1000 = 1.1
> print(1100/1000) --> 1.1 |
|
|
| Report Abuse |
|
|
|
| 19 May 2016 06:24 PM |
wth... x = number/number print(x)
#code mod = require(sike) if not mod.xThe[...] then print("You're not RbxDev yet..") end |
|
|
| Report Abuse |
|
|
Investive
|
  |
| Joined: 13 Jun 2013 |
| Total Posts: 80 |
|
|
| 19 May 2016 06:26 PM |
| ok this is no help. I'm just trying to say that roblox for me doesn't return with 1.1 when you divide that it returns with 1 |
|
|
| Report Abuse |
|
|
Investive
|
  |
| Joined: 13 Jun 2013 |
| Total Posts: 80 |
|
|
| 19 May 2016 06:27 PM |
| if im printing it yes. I'm talking about NumberValues. Sorry for any confusion :P |
|
|
| Report Abuse |
|
|
|
| 19 May 2016 06:28 PM |
NumberValues can hold decimal numbers..
#code mod = require(sike) if not mod.xThe[...] then print("You're not RbxDev yet..") end |
|
|
| Report Abuse |
|
|
|
| 19 May 2016 06:31 PM |
what are you talking about
print(1100/1000)
----> 1.1
???
This siggy is copyrighted © |
|
|
| Report Abuse |
|
|