First, tweak your initialize and update. It’ll make your coding process a lot better down the road.
For crouch the character class comes with basic crouching already coded.
Enable Crouching
CMC Settings → Nav Movement → Movement Capabilities
Animation Event Graph
Transition Enter Rule
Transition Exit Rule