Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make character move only in two direction?

Rather than character moving in all three axis, I want him to move only in two: up-down and right-left.

I do know how to do that with BodyPosition, but to spice things up, I wanna change the angle in which character can move. That means if he can move left-right, I want him to move bit forward-backward.

If you can't make sense of what I am saying, try to imagine coordinate system with X and Y axis. That will be the "bird view" of character moving. There, X axis would be character moving with normal BodyPosition.maxForce(0,0,500000). Now imagine a line that goes 30° relative to X axis. My question is, how do I make character move on that 30° line?

2 comments

0

Thank you for blowing my mind today with this code theory.

1

No problem.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.