Why isn't the variable being set during gameplay? (behavior tree and casting)

is this correct? when I run the game nothing is being printed