# What's the difference between LinearVelocity and VectorForce?

What’s the difference between LinearVelocity and VectorForce? In my own experience, LinearVelocity adds force slower than a VectorForce, but I don’t think that’s right…

2 Likes

Well the main difference is that LinearVelocity is not a property, it’s a method. A method is a function that is a property of a class,
and a property is a value that is a property of a class.

1 Like

LinearVelocity is used for applying force to something and maintain, well, a linear velocity.

Where as VectorForce is also used to apply a force to something. Main difference is that the direction as well as strength is determined by a Vector3 value, and it can be relative to an attachment on the part, another attachment, or the world.

You can read more on the documentation if you would like to learn more between the two.

LinearVelocity: LinearVelocity | Roblox Creator Documentation

VectorForce: VectorForce | Roblox Creator Documentation

2 Likes

That should all be tweakable through the properties such as MaxForce and stuff. What @AmoraFolf said is pretty much the whole answer, but in case you (or anyone stumbling upon this post) haven’t taken a physics class in school yet, I’d like to add a little bit of abstract.

In physics, velocity refers to speed and direction. This is represented by a vector, and in our case Roblox’s Vector3 type since this is 3D space.
Force causes acceleration, also known as a change in velocity. The longer a force is applied, the more acceleration is applied. More force is needed to accelerate a heavier object to the same speed. The actual formula is pretty simple: `Force = mass * acceleration`
If you want an object’s velocity to increase by 12 studs per second for every second that a force is applied,
you would do something like this: `required_force = part:GetMass() * 12`
You could then apply that with VectorForce.

LinearVelocity will automatically handle all of these calculations and try to maintain the force required to maintain the desired velocity. LinearVelocities might need tuning so they don’t overshoot their target velocity or take too long to get to speed. If you want it to be as perfect as you can get it, you will need to carefully tune it individually for every mass of object. Usually though, you won’t need things to be so perfect.

This is all incorrect, LinearVelocity and VectorForce are both classes. Neither of them are methods or properties.

4 Likes

hey @AmoraFolf and @JarodOfOrbiter, both of your answers are pretty good and got me interested in studying physics, but sadly I can’t give both of you guys solutions

Thanks tho!

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.