Not understanding the error

I am having problems with the code not working. We have tried different orders and different types of collisions with the same error. I’m at a loss why it is not working.

https://studio.code.org/projects/gamelab/96qjrOPl4-yo8AI7aEID1f6yfx28RKifGRxcleL-I0w[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: [replace with link to the curriculum or get the “Share” link to a project]
What I expect to happen: [I expect the coin to go away and randomly appear somewhere else on the screen.]
What actually happens: [error]
What I’ve tried: [reordering the code and different collision types]

@ahiggins,

Line 10 is where the real error is happening. On line 10, the coin is being changed from a sprite into a number … maybe that is supposed to say coin.scale = 0.5;

Since coin is now a number, it throws the error later in the code when you are asking it to check collision between a sprite and a number.

Hope this helps!

Mike

Thank you! I have looked over that several time and still missed it!!!