# Unit 3, Lesson 20, bubble 4

**URL:** <https://forum.code.org/t/unit-3-lesson-20-bubble-4/35518>\
**Category:** Coding and Debugging Help\
**Created:** [December 1, 2021, 7:32pm UTC](https://forum.code.org/t/unit-3-lesson-20-bubble-4/35518 "2021-12-01T19:32:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ltucker](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@ltucker](https://forum.code.org/u/ltucker)\
**Post date:** [December 1, 2021, 7:32pm UTC](https://forum.code.org/t/unit-3-lesson-20-bubble-4/35518/1 "2021-12-01T19:32:09Z")

</div>

[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]

**Link to the project or level:** [Code.org - Game Lab](https://studio.code.org/projects/gamelab/gjkWkeWl6I5m3ZT5beVo-5T2M43lVo214FLCw06gp3s)  
\*\*What I expect to happen:\*\*line 50 has the code for the ‘player’ to move up when the up key is pressed - I would expect the player to move up the screen continually  
**What actually happens:** The player moves up once. It seems to be acting like “keyWentDown” instead of “keyDown”  
**What I’ve tried:** deleting the code and re-entering it, refreshing the browser, comparing it to other code written that works as expected.

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

---

<div class="post-metadata">

**Author:** ![edavis](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/edavis/32/4927_2.png) [@edavis](https://forum.code.org/u/edavis)\
**Post date:** [December 1, 2021, 11:30pm UTC](https://forum.code.org/t/unit-3-lesson-20-bubble-4/35518/2 "2021-12-01T23:30:35Z")

</div>

Hello @ltucker , I looked at your code, but I guess I’m not seeing the problem. The dog goes up with the up key. I didn’t see any code to make it go down. It seems to be working as expected unless I’m reading your expectations incorrectly.

---

<div class="post-metadata">

**Author:** ![ltucker](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@ltucker](https://forum.code.org/u/ltucker)\
**Post date:** [December 2, 2021, 4:06am UTC](https://forum.code.org/t/unit-3-lesson-20-bubble-4/35518/3 "2021-12-02T04:06:06Z")

</div>

Her code to make it go down is at lines 56-7

The code at lines 50-51 should cause the dog to go up with a vel of 2 but it will only do it while the up key is being held down. I have the exact same code (with a different player name) in the one I did on my own and it goes up with a vel of 2 as soon as I hit the up key… I’m not sure what’s going on - I don’t think it’s her code, I think it’s her gamelab (?)

---

<div class="post-metadata">

**Author:** ![mwood](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mwood/32/4941_2.png) [@mwood](https://forum.code.org/u/mwood)\
**Post date:** [December 2, 2021, 5:29am UTC](https://forum.code.org/t/unit-3-lesson-20-bubble-4/35518/4 "2021-12-02T05:29:39Z")

</div>

@ltucker,

Line 45 is the line that is causing the issue you are seeing. The dog’s y value starts at 300 and with each click of the up key, it gets even smaller. As a result, line 45 is always in play and unless you are clicking on the up key, the velocityY of the dog is set to 0.

Hope this helps!

Mike

---

<div class="post-metadata">

**Author:** ![ltucker](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@ltucker](https://forum.code.org/u/ltucker)\
**Post date:** [December 2, 2021, 11:38am UTC](https://forum.code.org/t/unit-3-lesson-20-bubble-4/35518/5 "2021-12-02T11:38:10Z")

</div>

Thanks - I just found it before I logged into my email - wish I’d have read this first!
