How would I lock character to the X and Y axis in a 2d platformer?

Hi, I’m making a 2.5d platformer game in roblox. My character sometimes get’s pushed behind the map and falls off, so I’d like to figure out how to restrict it to the X and Y axis and prevent it from moving anywhere on the Z axis

4 Likes

Have you tried using BodyVelocity, setting the max force to infinite on the axes needed and setting the Velocity to (0,0,0)?

3 Likes

I have not, I will try that. If it works then thank you.

It worked for my rocket, what that does is it limits movement on some axes.

Yeah it works, thank you very much.

1 Like

Glad to help, can you send a game link sometime? That sounds like a fun game I wanna play when you release.

Oh yeah, I’ll send you it when it’s done. It’s a remake of my friend Jeff’s game, which was remade by my friend Coffee two times. The sprites here are recreations of Coffee’s 2nd remake.

Sounds cool. Good luck, too! :D

1 Like