How to use LinearVelocity

How to use LinearVelocity, i think bodyvelocity was better, i quite dont understand this one, i already readed the documentation

my settings to apply force on a bodyvelocity are this

``````local bodyvelocity = Instance.new("BodyVelocity")
bodyvelocity.MaxForce = Vector3.new(50000, 0, 50000)
bodyvelocity.P = 15
bodyvelocity.Velocity = Vector3.new(0,0,-50)
bodyvelocity.Parent = hinge
``````
3 Likes

Linear Velocity works like bodyvelocity but better? not sure how its better(Its better because it has more features I guess) but to make it work you need an additional which you need to add an Attachment inside the part you wanna move.

Example Usage to make it work like BVelocity:
GIF

3 Likes

Cool!!, but where do i put the attachment, if i put in on another position it will just fling, not move In Z order

If i put it like this it will just fling like that

And i want a result that moves a rect direction like this

Make sure to center the attachment if not then you wont get the expected results you want from how the part will move since itâ€™ll be based on the attachment.

I did but it keeps acting weird

can you show an video of whats happening and maybe show the properties of the velocity

It justs flings in air ?

show me the attachmentâ€™s position because this would happen if the position isnâ€™t centralized

I meant the Properties on the explorer

yea its not on center

make sure its 0,0,0

Attachmentâ€™s position is relative to the parent so its automatically at center if you put the `Position` at 0

Good!, fixed, thanks very much

Summary

This text will be hidden

1 Like

If you can help me on this one too please

it kind of sucks because it is unaffected by gravity and there are no individual axis to control the maxforce.

I have made a dash system but the dash does not go in the direction i want or even move at all. Would be a lot easier with bodyvelocity.

``````local playinganimation
local attachment = Instance.new(â€śAttachment, humanoidrootpart)
local v = Instance.new(â€śLinearVelocityâ€ť, attachment)
v.Attachment0 = attachment
v.MaxForce = Vector3.new(999999,0,999999)

-user input checking for 4 different keys checking for W A S D (since player already pressed Q) and it sets playinganimation to the specific keybind direction dash then sets
v.VelocityVector to 50 studs in front of the humanoidrootpart and does that for W A SD when pressed then

``````

it plays the animation but doesnâ€™t move the humanoidrootpart

my bad if it looks quite messy iâ€™m on mobile so.