BodyVelocity Issues

Hello, so I’m trying to make a dunk system sort of to where ever you’re facing you’ll be forced into that direction but when I go for a dunk and the code runs it only forces me into one direction, how would I make it so the force goes only to the direction where the character is facing? If this way is inefficient is there a better way of doing it?

Here’s the clip of the example of how the characters body will only be forced in one direction, no matter where I’m looking https://gyazo.com/4c22f70a5ea166847d1fe34212b84561

Here’s the code https://gyazo.com/ecd445f6ee0426bc47890de02d5f6751

Try using part.Velocity instead in a while loop.

What do you mean by part.Velocity, is that a function or something that I don’t know about?

its a property. You must use it in a while loop, though.

It seems like you are trying to use Roblox’s physics to simulate the throw, in this case you could use Roblox’s VectorVelocity instance which allows you to manipulate MaxForce, Direction, and what that force is RelativeTo.

VectorVelocity replaced BodyVelocity, deprecating the instance.

If you would like a constant force movement use VectorForce, which is the exact same as VectorVelocity excluding a select amount of opposing forces.

There are several different ways to measure the force of a physics object, you can find all of them on the Roblox Creator Documentation website.

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