I have a smooth transition when I stand up but not when I crouch down.

I’m trying to control the capsule height to get the player to crouch and stand up.
But no transition whatsoever when I press c, and smooth transition when I stand up.
I don’t know what the difference is, can someone help me out?