Make a variable inside of your player character (bool) called CanClick. When the button is pressed, check CanClick is false, run the code before setting CanClick to true. Inside of the player character, if the input button for pressing is not down, set CanClick to false.