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

How do I Change Velocity of an Object?

So I made a script and I need to set the velocity of an object to zero, in all directions. I tried body.Velocity = 0 and it did not work. I tried to find how to do it and it says I need to use the Vector3. I tried body.Velocity = Vector3(0,0,0). It did not work. Can someone please explain to me how to do it?

2 comments

1

body.Velocity = Vector3.new(0,0,0)

0

That depends, do you need part's velocity to be something else at the beginning and then change to 0 or do you just need the velocity to be zero. If you need it to change then yes you would do that in a script but if you just need it to be 0 from the start just manually set it to 0

1 answer

✓ Accepted answer

Hello TheFierceWaffle, Setting a part's velocity how you did it, (body.Velocity = Vector3.new(0,0,0)) ,works, but there may be other factors changing it such as Gravity and other objects interacting with it. If you want to override the part's velocity all together, I suggest using a Body Mover, more specifically a BodyVelocity.

Hope this helps.

2 comments

0

Thank You! I just wanted it to stop moving from a Velocity I set earlier, as I had made a gernade. Thank you!

0

No problem! Glad to see it helped!

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