DangCool
|
  |
| Joined: 27 Apr 2010 |
| Total Posts: 5568 |
|
|
| 03 Dec 2012 12:15 PM |
So when i do this:
local par1TXT = ""; while true do par1TXT = game.Workspace.DangCool.Torso.Postion.X end
How would I make it so it doesn't give you a a bunch of other numbers Example: My Position for "X" : 2.0301231053456
I just want it to show the number "2"
I'm a Mini - Mod |
|
|
| Report Abuse |
|
|
|
| 03 Dec 2012 01:59 PM |
local par1TXT = ""; while wait() do par1TXT = math.floor(game.Workspace.DangCool.Torso.Postion.X) end
math.floor rounds your number down. |
|
|
| Report Abuse |
|
|
|
| 03 Dec 2012 02:00 PM |
local par1TXT = ""; while wait() do par1TXT = math.floor(game.Workspace.DangCool.Torso.Postion.X + .5) end
math.floor(x+0.5) rounds your number to the closest integer |
|
|
| Report Abuse |
|
|
|
| 03 Dec 2012 02:02 PM |
math.floor(x+0.5)
rounds x to the nearest whole number (2.7 to 3 instead of 2), just if that's helpful. |
|
|
| Report Abuse |
|
|
| |
|