Player movement ice slide puzzle game

Hi

So I wanted to make a 3D ice slide puzzle game. It’s a simple game where you try to escape the “maze”.
alt text

This is how it should work:

  • If I press the UpArrowKey my player cube will move forward till it hits an object.
  • When my player cube is moving, I can’t press any other key or do any other movement. This prevents diagonal movement.

I have already tried several things, but i failed every time. I have deleted my script to start from scratch with your help. Please help me.
Thank you

same thing, have you found a reliable way to achieve this ?