# Why is this not working

**URL:** <https://forum.code.org/t/why-is-this-not-working/21574>\
**Category:** Unit and Lesson Discussion\
**Tags:** csd-unit-3, csd-unit-3-lesson-14\
**Created:** [October 31, 2018, 5:18pm UTC](https://forum.code.org/t/why-is-this-not-working/21574 "2018-10-31T17:18:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![crinkel](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@crinkel](https://forum.code.org/u/crinkel)\
**Post date:** [October 31, 2018, 5:18pm UTC](https://forum.code.org/t/why-is-this-not-working/21574/1 "2018-10-31T17:18:43Z")

</div>

He is trying to get the fish to swim over to the bear but it will only move back and forth. What are we missing?

[https://studio.code.org/projects/gamelab/fFDdleXbqNcQVSRbS\_vH95I0kKpj3MyuU1VxFrK73WU](https://studio.code.org/projects/gamelab/fFDdleXbqNcQVSRbS_vH95I0kKpj3MyuU1VxFrK73WU)

---

<div class="post-metadata">

**Author:** ![mriley](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mriley](https://forum.code.org/u/mriley)\
**Post date:** [November 1, 2018, 6:34pm UTC](https://forum.code.org/t/why-is-this-not-working/21574/2 "2018-11-01T18:34:24Z")

</div>

You can’t create your variables inside the draw loop. look at the code after I remixed it.  
[Remix](https://studio.code.org/projects/gamelab/xBXM12jxDquGU2PQzVzuUpC6uR0fFZfTn9FqZpjTCWM)

---

<div class="post-metadata">

**Author:** ![bradleywellsashley](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bradleywellsashley/32/522_2.png) [@bradleywellsashley](https://forum.code.org/u/bradleywellsashley)\
**Post date:** [November 5, 2018, 3:58am UTC](https://forum.code.org/t/why-is-this-not-working/21574/3 "2018-11-05T03:58:15Z")

</div>

Mr. Riley,

Thanks for helping out AND using the AWESOME remix feature, it’s a great tool for the classroom.

Brad
