Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I Change Velocity of an Object?

Asked by 6 years ago

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?

1
body.Velocity = Vector3.new(0,0,0) KamikazeShard 23 — 6y
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 Skyraider5 -21 — 6y

1 answer

Log in to vote
2
Answered by
Eqicness 255 Moderation Voter
6 years ago

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.

0
Thank You! I just wanted it to stop moving from a Velocity I set earlier, as I had made a gernade. Thank you! TheFierceWaffle 64 — 6y
0
No problem! Glad to see it helped! Eqicness 255 — 6y
Ad

Answer this question