Mimicking 2D Rotation with a 3D Rigidbody

I want to have my player rotate left or right depending on what direction the player wants them to face. I have looked online for how to do this, but nothing fits my purpose. Can anyone help me with this? It would be greatly appreciated.