Using bool to check when action is ongoing

I’m trying to use a bool to check if the player is doing a certain action, if he isn’t then he’ll be able to do it, but I can’t figure out how to disable the bool after he’s done so that it can be repeated…

Here’s what I have

if (inTrigger)
        {
            if (Input.GetKeyDown(KeyCode.E))
            {
                if (doingAction== false)
                {
                    doingAction = true;
                    animator.SetBool("doAction", true);
                    source.PlayOneShot(sound);
                }
            }
        }

well why don’t you think about it, outside any code?
if you don’t want to repeat the action, until when that holds true?

You can use AnimationEvents to find when animations reach certain points, such as the end:

OR… you can just keep track of time yourself and when the animation is done, clear the boolean.

OR… put the entire process above in a coroutine with such a delay, and clear it at the end of the coroutine.