How do you hide sprites

In the Interactive Card Lesson 17 a student has a sprite on the screen, but wants to hide it, or make it disappear using an if then esle block. How can he accomplish this?

Since Iā€™m not a teacher, I found an easier way to accomplish this goal with one block.

sprite.visible = true;
//this can be true or false depending on what you want.

I hope this has helped you!

2 Likes

@greene,

@pluto is correct - the sprite.visible allows a sprite to be hidden or visible.
sprite.visible = true means the sprite can be seen
sprite.visible = false means it is hidden

So in an if statement, it might look like:

if (some condition is true like sprite.x > 200){
sprite.visible = false;
}
Good luck!
Michelle