How to stop rigidbody player from rotating?

Hey, I’m new to Unity (and programming/scripting) and am just working on a very basic top-down shooter. I’ve created a simple cube player that I’ve set up to move up, down, left and right using WASD. It has a rigidbody and is “walking” on a cube I set up for the ground.

However, when I start to move around, the player eventually starts rotating – presumably due to the physics attached. How can I stop this rotation? I know that I could freeze rotation in the rigidbody settings, but I’d actually like the character to, for example, topple over when it falls into a hole. Any ideas?

in the inspection go to the rigidbody and press the button that says constrains and the lock the rotation