Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to find the speed that a part is moving at?

Asked by
Discern 1007 Moderation Voter
9 years ago

If a part is flung across the map and I want it to do damage if it is moving fast enough, how would I do this?

Would the Velocity property work?

Like maybe this:

speedOfPart = game.Workspace.Part.Velocity --Maybe?

Or would I have to do something more such as magnitude and such? I just have no idea where to start.

0
Velocity(BodyVelocity) is more of a Force, Than to find the Speed. woodengop 1134 — 9y
0
So maybe get the position of the part at different points in time and then use magnitude? :D Discern 1007 — 9y
0
I do not know much about magnitude, but you can try it out. woodengop 1134 — 9y
0
Check how fast it is moving at. Take the X and Z properties in the Velocity and find the average(X+Z/2) and that is the speed they are flying at. You need to make sure in a script, that X or Z is not 0. EzraNehemiah_TF2 3552 — 9y

Answer this question