>>340912481
This right here?
The left "off" node has an exit time of 0 and disabled the "has exit time" square so it's not ticked.
The condition has it set to "Hatobject_equals_1"

The right "on" node has an exit time of 0 as well and also disabled has exit time.
Condition has it set to "Hatobject_Not equals_1"

the "on" node also the has animation of the hat being toggled on in the motion slot at the top