Freeze rotation X but rotation Z, how can I do this?

this image explains what I want to do, even with relief on the ground, my character is not forced to fall, only if I leave the platform. And in this, it is possible to rotate according to the terrain, ie the Z axis. How do I do this? I tested activating Freeze Position X, and it worked, but my player did not spin anymore on the Z axis, and I want to be able to spin it.
 
                 
                ex12.jpg 
                (250.5 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Transition between two angled planes 1 Answer
After Rotating a Prefab, Transform.Position of children is inaccurate 1 Answer
Rotate towards mouse pointer 1 Answer
2D Sprite issue when rotating towards mouse click location. 2 Answers
He wants to write a script on a page change gait from right to left or vice versa 0 Answers