FPS crouching

Is there a way I can make a timed transition between the crouch and uncrouch functions? I want to make it so that he isn’t instantly crouched and then instantly standing when the button is pressed. I cant do animations because it is purely a fps. Any ideas would be awesome. Thankyou in advance!

You could use a timeline.

When you press the crouch button it can lower down your camera to the position you want it to have by using a float curve of the expected heights and once it’s finished just call the function crouch.