Change Capuse half height creating a smooth transition (c++. FPS)

c++

I’ve tried to do it my way, but isn’t working. I solved it temporarely with a timeline in BP, but noW the problem is changing the location of the character so that is doesn’t get stuck in the floor.

BTW, I should have mentioned it before but my problem is with First Person Camera.