keyDown code not moving Sprite

Link to the project or level: Game Lab - Code.org
What I expect to happen: Sprite named Max to move down when space bar pressed.
What actually happens: Sprite Max stays in the sky and doesn’t move down
What I’ve tried: keyDown code

@thelma.johnson,

Thanks for contacting us on the forum!

A few things to look at.

1, you can’t use max as a sprite name (see the yellow warning) because max is a name reserved in the system for some math functions.

2, after you change the name, you will also need to make sure you are redrawing the background every pass through the draw loop.

If you change the name to Maxmillian (for example) and then add a watcher in the bar below the screen of Maxmillian.y, you will see that the down key is changing the y value, you just can’t see it because of the way the background is drawn.

Feel free to reach back out if you have any other problems getting it to work and we are happy to help!

Good luck!

Mike