Have a Bug in Lesson 27 Project Design

[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]

Link to the project or level: Game Lab - Code.org
What I expect to happen: fruit is falling and player earns points by catching the fruit. We want the fruit to reset and fall again after it is caught.
What actually happens: We are using a RandomNumber for X value to let the sprite fall from different location after being caught. It is bouncing from left to right and not falling.
What I’ve tried: I have pulled it out and had it work based on falling past a Y coordinate. But using the “IsTouching” command does not work.


Ahh… a tricky one. The problem isn’t in the code…

If you look at your animations tab and the player animation, you will see that the player has a lot of empty pixels above (and below) his head (as well as to the right and left). Basically, the player sprite fills the screen even if you can’t see it.

There is a crop button in the sprite drawing tools that you can click and it will delete all the empty space around the sprite.

You may need to adjust the player coordinates after that, but I think your code should work fine after that.

Let us know if that doesn’t work.