How to align the transform.rotation.y with the world space vector y?

My character can roll fall etc. I want him after that to standup and freeze constraints rotationZX. So how and with what function can I align the transform of the character with the word space vector up? I tried transform.rotation = Quaternion.LookRotation(transform.up, Vector3.up); But it didn’t always work (I tried without any constraints). Should I maybe use the Quaternion.FromToRotation()? I still can’t get a clear picture in my head of how these functions work. Someone told me that u can see a quaternion as a point on a sphere with two points u can have a rotation, so that’s why I though transform.up, Vector3.up…

@mike29willems:

transform.up = Vector3.up;