Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What does was script.Parent.Velocity return?

Hello everyone, I've got a question, I have not been able to find it in the wiki so...

if i do script.Parent.Velocity where Parent has a ClassName of model

what does the Vector3 include? Is it speed x, speed y and speed z? Or speed, direction, location.

Any help is appreciated.

3 comments

0

Models don't have a Velocity. What is your question?

0

Models do not have a Velocity property, I believe. Models simply hold objects, they do not have any defining properties. The Velocity property inside Parts returns a Vector3, which is just X, Y, Z.

0

It's the speed and direction.

1 answer

✓ Accepted answer

There are multiple 'velocity' properties for certain Instances. Such as a Part, BodyVelocity, TextureTrail, and more.


##For BasePart (All part types) and BodyVelocity

BasePart.Velocity would give you a Vector3 value, the same goes for BodyVelocity. This Vector3 signifies a force on given axes (X,Y,Z). Due to this being a force, you would say that this gives you the speed and direction. Like if you were to only provide a real number on the X axis, you'll have a force going in that direction making it a certain speed as well.


For others (FloorWire, some contraints, etc)

FloorWire.Velocity, for example, gives you a float which is a number. In the case of FloorWire, it's the speed a texture goes along the wire. These are all basically just a number that signifies an amount of speed at a given direction. Probably a way you angle it or set another property.

2 comments

0

I'll just tag on that it is not location in the case of Velocity.

0

Thanks a lot, really helpful, thx god it's a Force, then it's easier to do drag stuff.

This discussion is preserved as it was. New answers, comments, and votes are closed.