How can I get the velocity script working?

So I’m trying to make a system where there is a variable called “Direction”, and it will hold a string value that will either be “Right” or “Left”. Depending on which one it is, I want to use a linear velocity attachment to move the player in that direction, but I can’t seem to figure out how to do that.

I’ve put print statements in each while loop to print the LineVelocity. They print each time, but they show that the actual velocity isn’t changing. Does anyone know what I’m doing wrong?

2 Likes

The property LineVelocity only works for when LinearVelocity.VelocityConstraintMode == “Line”, and it accepts only float types.
I would try using the VectorVelocity property instead, because it accepts Vector3 values.

2 Likes

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