# How do you hide sprites

**URL:** <https://forum.code.org/t/how-do-you-hide-sprites/37466>\
**Category:** CS Discoveries\
**Tags:** csd-unit-3\
**Created:** [January 12, 2023, 4:03pm UTC](https://forum.code.org/t/how-do-you-hide-sprites/37466 "2023-01-12T16:03:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greene](https://avatars.discourse-cdn.com/v4/letter/g/c77e96/32.png) [@greene](https://forum.code.org/u/greene)\
**Post date:** [January 12, 2023, 4:03pm UTC](https://forum.code.org/t/how-do-you-hide-sprites/37466/1 "2023-01-12T16:03:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pluto](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/pluto/32/9141_2.png) [@pluto](https://forum.code.org/u/pluto)\
**Post date:** [January 12, 2023, 4:30pm UTC](https://forum.code.org/t/how-do-you-hide-sprites/37466/2 "2023-01-12T16:30:13Z")

</div>

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

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

```

I hope this has helped you!

---

<div class="post-metadata">

**Author:** ![melynn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/melynn/32/4925_2.png) [@melynn](https://forum.code.org/u/melynn)\
**Post date:** [January 13, 2023, 9:11pm UTC](https://forum.code.org/t/how-do-you-hide-sprites/37466/3 "2023-01-13T21:11:17Z")

</div>

@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
