Besides that Construct is not the right place to perform this type of action (it runs multiple times and not when you desire), You see that the blue object pin of VariantOption is connected to the switch input, but the var is not updated without executing the white input pin on the variable node. This results in an outdated and invalid variable.
Connect the “OnClick” node to the GetActorsOfClass node , replacing construct. Then check if the array produced by GetActorsOfClass contains anything, else index 0 will result in out of bounds error.