Roblox UtilitiesDevlHub Roblox Documentation

Class

BodyVelocity

Deprecated
Inherits
BodyMover › Instance › Object
Memory category
Instances

Applies a force to maintain a constant velocity.

Deprecated. This object is deprecated and should not be used for new work. Use LinearVelocity instead, and see the legacy conversion notes.

The BodyVelocity object applies a force on an assembly such that it will maintain a constant velocity. The Velocity property, not to be confused with BasePart.AssemblyLinearVelocity, controls the goal velocity.

BodyVelocity is the linear counterpart to BodyAngularVelocity. If you need the assembly to move toward a goal position, use BodyPosition instead. If you need further control on a force applied to an object, consider using a BodyForce or BodyThrust instead.

The strength of the force applied by this object is controlled by several factors, namely the difference between the assembly's current velocity and the goal velocity. This is multiplied by P (power) to either amplify or diminish it. The resulting force is then capped by MaxForce.

Properties 5#

MaxForceVector3Determines the limit on how much force that may be applied to each axis.ReadSafe
maxForceVector3ReadSafeDeprecatedNotReplicated
PfloatDetermines how aggressive of a force is applied in reaching the goal velocity.ReadSafe
VelocityVector3Determines the goal velocity.ReadSafe
velocityVector3ReadSafeDeprecatedNotReplicated

MaxForce: Vector3#

ReadSafe

This property determines the limit on the amount of force that may be applied on each axis in reaching the goal Velocity. If an assembly isn't moving, consider increasing this value and also check that it is not Anchored or attached to any anchored assemblies.

maxForce: Vector3#

NotReplicatedDeprecatedReadSafeDeprecated

Deprecated. This property is a deprecated variant of BodyVelocity.MaxForce which should be used instead.

P: float#

ReadSafe

This property determines how much power is used while applying force in order to reach the goal Velocity. The higher this value, the more power will be used and the faster it will be used. The force the BodyVelocity exerts increases as the difference between the assembly's current velocity and the goal velocity increases. This property is multiplied to this force to either amplify or diminish it.

Velocity: Vector3#

ReadSafe

This property (not to be confused with BasePart.Velocity) determines the target velocity towards which force will be exerted. It is specified relative to the world, not the assembly.

velocity: Vector3#

NotReplicatedDeprecatedReadSafeDeprecated

Deprecated. This property is a deprecated variant of BodyVelocity.Velocity which should be used instead.

Methods 2#

GetLastForceNot implemented and will always return the 0 vector.
lastForceReturns the last force in the object.

GetLastForce(): Vector3#

This method is not implemented and it will always return the 0 vector. You are advised to use AlignPosition instead.

Returns

lastForce(): Vector3#

Returns the last force in the object.

Returns

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed