Crouching: how do i fix this mistake?

ive set up a crouch system for my character in a third person game by copying a similar state machine to my jump action which i made following a tutorial.
pressing crouch should set the crouch state and enter the crouch blendspace following the enter animation, then pressing crouch again should play the leaving animation and exit the crouch state.
currently the crouch state is entered on both presses so i need to set up some kind of toggle inside the characters animation blueprint… i think. but its not something i know how to do, ive tried using branches, flipfloping and setting up the crouch input action a few ways but no luck. im sure its a simple mistake for somebody who knows what there looking at… hint hint

ive added a picture for the bp graph and where i think i messed up in the state machine (no definition between leaving and entering crouch) really appreciate it if anyone could take a look. thanks

alt text

i fixed the entering exiting states issue by moving the majority of the workload to blueprints and simplifying the state machine ( i think the missing NOT boleen variable was the main issue but the blueprint is still easier to build off).

ive attached images of the working blueprint and state machine i remade from the earlier images in case anyone here has the same or similar issue with there crouch.

follow up question:
the area marked slow down speed is currently not working however. i think this clashes with the walk/run speed setup i have and this is the only means i know to effect the characters speed… any suggestions?alt text

Have player enter begin crouching animation when boolean IsCrouching is true.
Use Time Remaining Ratio node to transition to crouching movement when begin crouching < 0.1. ( meaning it is over 90% finished with begin crouch animation)
Use the transition rule from crouching movement to End Crouch with IsCrouching is false.
Use Time Remaining Ratio node again to transition End Crouch to Idle.

thanks for the reply. i’m using the same timing setup to trigger the animation already. although its good to get some clarification. i missed including the connection your referring to in my pictures sorry that’s a bit misleading