Changing variable on right mouse click

Use the node “Enable Actor Input” and you don’t need to use a switch this way. There is a node specific for toggle things called Flip/Flop