How do I lock movement to Axis even if player is effected by object

Hi I am extremely new to unity am trying to make a simple game where a board moves back and fourth along the X-Axis and hits a jump in the middle of the level. My problem is when the board hits the jump it not only propels the board in the air but it moves along the Z-axis making the board out of place to hit the jump a second time from the opposite direction. Is there any way to lock the board preventing it from moving on the Z-axis while in the air? Thank you for your help!

Heres a picture of the game if it helps give you a better idea. Screenshot - 38e1b9e8e04525d673f278c377e8c7f1 - Gyazo

The rigidbody component has a Constraints-part, where you can freeze the position and rotation on any axis.

That will cause the rigidbody to ignore outside forces that would move it in those ways - so if you freeze y-rotation, hitting stuff won’t rotate it over the y-axis. The rigidbody can still be rotated by scripts, though.