CDs not disappearing

Link to the project or level: https://studio.code.org/projects/gamelab/NpsjptT51QhVwODfVd2ZGmUVZKwdO7YlqmeE1eN5Yg8

What I expect to happen: CD’s do not disappear. Text then does not change per code.

**What actually happens:**Nothing.

What I’ve tried: using == instead of =

I like your project, but you do have quite a bit going on here! As far as the CD’s not disappearing, you’ll want to look at a few things.

I see you tried using == instead of =

Use the single = when assigning a value to a variable. For example in your lines 7, 10 & 13, use the single = [cd.visible=true;] You only need cd.visible once in each line of code and make sure visible is spelled correctly. :slight_smile:

Then, inside your draw loop, you would change the visibility to false the same way … cd.visible=false;

However, even though that should make the variables update correctly, you need to redraw everything inside the draw loop (including the background), so you will want to move your background block inside the draw loop.

As far as the text goes, text can’t be treated like a sprite the way you are trying to do it. You may want to create a sprite with text built into the sprite. It could have the same background color as the background and could be made visible while the cd is made invisible.

There are probably other ways of handling text as well, but I don’t think you can set the property of text to visible or invisible (someone please correct me if I’m wrong!)

Hope this gives you some debugging ideas!

Mike