|
| 28 May 2014 07:16 PM |
| I know there's a x,y,z value in the properties, But how would I get how fast it's going total? |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 May 2014 07:18 PM |
| math.sqrt((Part.Velocity.X)^2 + (Part.Velocity.Y)^2 + (Part.Velocity.Z)^2) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 28 May 2014 07:21 PM |
| Or you could just do Part.Velocity.Magnitude. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 28 May 2014 07:23 PM |
| I know it's how do use I for distance, but I don't know what it is exactly. |
|
|
| Report Abuse |
|
|
|
| 28 May 2014 07:25 PM |
Magnitude is the distance of a vector merged into 1 number. More here: http://wiki.roblox.com/index.php?title=Magnitude
|
|
|
| Report Abuse |
|
|
|
| 28 May 2014 07:30 PM |
So like this?
local screen=script.Parent local part=screen.Parent part.Changed:connect(function(property) local velocity=part.Velocity local position=part.Position screen.Velocity.Text='Velocity|'..veloctiy.Magnitude end) |
|
|
| Report Abuse |
|
|
wohoo1997
|
  |
| Joined: 28 Jan 2011 |
| Total Posts: 9101 |
|
|
| 28 May 2014 07:31 PM |
Have you learned this in Science Class yet? Velocity is Speed + Direction. |
|
|
| Report Abuse |
|
|
|
| 28 May 2014 07:43 PM |
@woohoo get out @theprogramming Yes, except that you spelled velocity wrong on the line where you set the text. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 28 May 2014 07:44 PM |
Magnitude is literally doing exactly what Josh said. But all Vector3's have a built-in member than does it for you. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 28 May 2014 07:44 PM |
local screen=script.Parent local part=screen.Parent part.Changed:connect(function(property) local velocity=part.Velocity local position=part.Position screen.Velocity.Text='Velocity|'.. tostring(velocity.Magnitude) end) |
|
|
| Report Abuse |
|
|