.isTouching not working

Hi!

If you follow the program step by step, it first creates the coin sprite, then calls the function setCoin. That function checks to see whether the bunny is touching the coin, but the bunny has not been created yet. You can’t call a function that uses the bunny sprite before you create the bunny sprite. If you move the function call down to after the bunny is created, I think your program will work.

Elizabeth

1 Like