Making a sprite not visible with press of space key

Help! I have what appears to be a simple command but we cannot get it to work. My student wants his envelope sprite to disappear when the space key is pressed. We have simple draw loop and if statement with instructions to make the sprite.visible=false if keyDown space. It simply won’t work. I have to be missing something obvious.

Hi jlanglois,
I noticed that you figured it out! :+1:t3:
However, I also noticed that the sprites flash back and forth. To correct this, if I may suggest, remove the “else if” from the conditionals, by clicking on the “-“ sign on lines 32, 42, 52, 62, 72, and 82.
I hope that helps!
Paul

1 Like