Reset bool after transition

Hello,
i have bool “getHit == false”. I use it to check if transition between two state “Idle” and “PlayHit” is possible. If getHit == true state changes from “Idle” to “PlayHit”. After “PlayHit”, state return to “Idle”. If I don’t set getHit to false, the process will loop. So is it possible to reset bool right after transition? I have worked with Unity first and it has something like trigger that do what I mean.