Arduino PROJECT HELP

so from what I understand on arduino's page, it will only set off the buzzer when the condition of the if statement is true. I have been looking at some other various functions to try and make the digitalwrite for the buzzer continue even when the if condition is no longer true.

Look at the very last line of loop. That is also turning off the buzzer by writing it low. That needs to go away too if you want the buzzer to stay on.