# Sprites not disappearing after moving

**URL:** https://forum.code.org/t/sprites-not-disappearing-after-moving/22359
**Category:** Unit and Lesson Discussion
**Tags:** csd-unit-3, csd-unit-3-lesson-14
**Created:** [November 19, 2018, 5:33pm UTC](https://forum.code.org/t/sprites-not-disappearing-after-moving/22359 "2018-11-19T17:33:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dgarrett](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dgarrett](https://forum.code.org/u/dgarrett)
#### Post date: [November 19, 2018, 5:33pm UTC](https://forum.code.org/t/sprites-not-disappearing-after-moving/22359/1 "2018-11-19T17:33:40Z")

</div>

Students sprites are not disappearing after they are moving.

Students are using:

If ( keyDown(“right”)) {  
sprite.x = sprite.x +1;  
keyDown (“up”). setAnimation(spriteUp)  
}

The sprite shows the path it takes and creates a new sprite every time. What is wrong???

---

<div class="post-metadata">

### Author: ![elizabeth\_admin](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@elizabeth\_admin](https://forum.code.org/u/elizabeth_admin)
#### Post date: [November 20, 2018, 5:17pm UTC](https://forum.code.org/t/sprites-not-disappearing-after-moving/22359/2 "2018-11-20T17:17:20Z")

</div>

Hi, I don’t understand what this line of code is supposed to do:

`keyDown (“up”). setAnimation(spriteUp)`

‘keyDown(“up”)’ is not a sprite, so you can’t set its animation. I also don’t know what the value of the “SpriteUp” variable is. Can you link to the student project to help us understand what is happening in the program?
