How do I apply force based on the power bar?

Thank you, first and foremost, for trying to help. I am making a basketball game (trying to keep it a secret), just so you have some context.

In most sports games, a power bar loads as you press and hold the shoot button. The longer you hold it, the more power/force you give the object. I’ve created the power bar and have managed to have it appear and hide depending on if the shoot button is being held down. I’ve also figured out how to tween the Y-Scale to a maximum value (so it doesn’t shoot off the page). I’ve also figured out how to shoot the ball with a fixed force from a creation point and towards the mouse — but I want that force to change depending on the power bar. You get me?

Here’s a screenshot of NBA 2K20 so you understand what kind of power bar I’m talking about.

Thank you in advance! Please let me know if I can clarify.

— Garrett

I would say you only need to put an expression that get that Y Scale as replacement of the static force. If you cannot get it, you can also try to tween that y scale in a variable, set the force to the variable and always set the Y Scale to the variable’s value

1 Like

Thank you for your reply!

I’ve tried to use an expression to get the Y Scale to replace the static force, but I don’t think I’m doing it right because it’s not working.

Take a look:

The ball just drops straight down.

— Garrett