So I have a script which uses body velocity to make a player go towards his body velocity. To do this, I just have to get the look vector of the player and set it as the velocity. The thing I can’t figure out is how to make it go to the right or left of the player.
There is another property of CFrame (which I assume is what you’re using) called RightVector which will set it to go right.
Here is an example:
workspace.Part.CFrame.RightVector
For it to go left, set the RightVector to negative.
-workspace.Part.CFrame.RightVector
The reason this works is because UpVector, LookVector, and RightVector represent axes which have two values, positive and negative.
Hope this helped!
2 Likes