# Saying sprite.y not working

**URL:** <https://forum.code.org/t/saying-sprite-y-not-working/15294>\
**Category:** CS Discoveries\
**Created:** [March 28, 2018, 3:33pm UTC](https://forum.code.org/t/saying-sprite-y-not-working/15294 "2018-03-28T15:33:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksimpson](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@ksimpson](https://forum.code.org/u/ksimpson)\
**Post date:** [March 28, 2018, 3:33pm UTC](https://forum.code.org/t/saying-sprite-y-not-working/15294/1 "2018-03-28T15:33:03Z")

</div>

We keep getting an error that it does not recognize the sprite.y or velocity.y. We are changing the sprite name correctly. Before student tried to do loop she said it worked. I am missing the error. Thank you.

> **[Check out what I made](https://studio.code.org/projects/gamelab/mrdrfrpgUDpmBr9OEUettCK7HNCWo_Y-OdqgJGo20MU)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

**Author:** ![jold](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jold/32/5811_2.png) [@jold](https://forum.code.org/u/jold)\
**Post date:** [March 28, 2018, 4:30pm UTC](https://forum.code.org/t/saying-sprite-y-not-working/15294/2 "2018-03-28T16:30:20Z")

</div>

You are calling the draw function in line 4, this in turn tries to reference corgi but you do not create the corgi sprite until after line 4.

You do not have to call the draw function, game lab does that for you. Delete line 4 and everything works.  
Happy coding.

---

<div class="post-metadata">

**Author:** ![ksimpson](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@ksimpson](https://forum.code.org/u/ksimpson)\
**Post date:** [March 28, 2018, 11:20pm UTC](https://forum.code.org/t/saying-sprite-y-not-working/15294/3 "2018-03-28T23:20:06Z")

</div>

Thank you!! I have several students making the same mistake. This really helps.
