# Sprite not turning invisible

**URL:** <https://forum.code.org/t/sprite-not-turning-invisible/39962>\
**Category:** Coding and Debugging Help\
**Created:** [October 11, 2024, 8:04pm UTC](https://forum.code.org/t/sprite-not-turning-invisible/39962 "2024-10-11T20:04:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SkyhawkLilly](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@SkyhawkLilly](https://forum.code.org/u/SkyhawkLilly)\
**Post date:** [October 11, 2024, 8:04pm UTC](https://forum.code.org/t/sprite-not-turning-invisible/39962/1 "2024-10-11T20:04:09Z")

</div>

Trying to make a loading screen, the code should display the OS Logo for a second and a half before making it invisible. The visibility variable in my monitor shows it as false, but it does not disappear on the screen. I’m not sure why because it uses the same code as my previous projects for invisibility but just doesn’t work

//Screen variable controls what is being shown on the screen  
var Screen = “Startup”;  
//Startup screen sprites  
background(“Black”);  
var LOGO = createSprite(200, 200);  
LOGO.setAnimation(“LOGOGREEN”);  
LOGO.visible = false;  
if (Screen == “Startup”) {  
Startup();  
}  
function draw() {  
drawSprites();  
}  
function Startup() {  
textAlign(CENTER, CENTER);  
textSize(50);  
text(“Loading OS”, 200, 100);  
setTimeout(function() {  
LOGO.visible = true;  
setTimeout(function() {  
LOGO.visible = false;  
Screen = “Login”;  
}, 1500);  
}, 1000);  
}

---

<div class="post-metadata">

**Author:** ![varrience](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/varrience/32/8042_2.png) [@varrience](https://forum.code.org/u/varrience)\
**Post date:** [October 12, 2024, 12:31am UTC](https://forum.code.org/t/sprite-not-turning-invisible/39962/2 "2024-10-12T00:31:09Z")

</div>

if that’s the case allow me to explain one of the quirks of how canvases actually work. Much like the name implies a canvas can be drawn on but will not clear itself unless explicitly stated

now that you know that i suggest re-checking your draw loop I’ll give a solution if your not sure further down if your still unsure of how to go about fixing it

```js
function draw() {
  background(255);
  drawSprites();
}

```

Best of luck!

# Varrience
