# Coding and Debugging Help

**URL:** https://forum.code.org/c/csd/debugging-help/393.md?page=2

[Latest](https://forum.code.org/latest.md) · [Categories](https://forum.code.org/categories.md) · [Tags](https://forum.code.org/tags.md)

**Page:** 3

---

## [Lesson 28: Final Project - Design a Game](https://forum.code.org/t/lesson-28-final-project-design-a-game/40536)

<div class="topic-metadata">

**Author:** [@langilla1](https://forum.code.org/u/langilla1)\
**Replies:** 2\
**Last updated:** [March 12, 2025, 8:26pm UTC](https://forum.code.org/t/lesson-28-final-project-design-a-game/40536 "2025-03-12T20:26:57Z")

</div>

My student wants this to happen: The keyDown “up” will only be able to be used once the score equals 100. I’m at a loss. Can you help?

---

## [Null error -debug support](https://forum.code.org/t/null-error-debug-support/40534)

<div class="topic-metadata">

**Author:** [@leslie.dillon](https://forum.code.org/u/leslie.dillon)\
**Replies:** 2\
**Last updated:** [March 12, 2025, 8:21pm UTC](https://forum.code.org/t/null-error-debug-support/40534 "2025-03-12T20:21:23Z")

</div>

Student is seeing an error that reads: Error: line 51: TypeError: Cannot read properties of null (reading ‘copy’). We cannot find the error. // Variables var score = 0; // Create Sprites var egg = createSprite(350,2…

---

## [Background appearing ontop of sprites](https://forum.code.org/t/background-appearing-ontop-of-sprites/40522)

<div class="topic-metadata">

**Author:** [@leslie.dillon](https://forum.code.org/u/leslie.dillon)\
**Replies:** 2\
**Last updated:** [March 11, 2025, 12:20am UTC](https://forum.code.org/t/background-appearing-ontop-of-sprites/40522 "2025-03-11T00:20:45Z")

</div>

Student created for unit 3 lesson 25. When 10 coins are collected the background sprite appears, however the bunny and coin do not.

---

## [Group sprites following other sprites](https://forum.code.org/t/group-sprites-following-other-sprites/40514)

<div class="topic-metadata">

**Author:** [@su8scri88le](https://forum.code.org/u/su8scri88le)\
**Replies:** 5\
**Last updated:** [March 9, 2025, 3:28pm UTC](https://forum.code.org/t/group-sprites-following-other-sprites/40514 "2025-03-09T15:28:24Z")

</div>

(Game Lab - Code.org) My student is trying to create sprites in a group following another sprite, neither of us have any clue on how to create this behavior We have tried whatever we could think of, nothing has worked. …

---

## [Debugging a code created for Game lab](https://forum.code.org/t/debugging-a-code-created-for-game-lab/40512)

<div class="topic-metadata">

**Author:** [@stephanie.hodgson](https://forum.code.org/u/stephanie.hodgson)\
**Replies:** 2\
**Last updated:** [March 7, 2025, 6:39pm UTC](https://forum.code.org/t/debugging-a-code-created-for-game-lab/40512 "2025-03-07T18:39:31Z")

</div>

One of my students is creating a game on game lab. Link to the project or level: Game Lab - Code.org What I expect to happen: In level 5, when the basketball is bouncing on the trampoline, it is supposed to bounce off …

---

## [App Lab U4L07: variable error and counts not showing on screen](https://forum.code.org/t/app-lab-u4l07-variable-error-and-counts-not-showing-on-screen/40511)

<div class="topic-metadata">

**Author:** [@nicole.green](https://forum.code.org/u/nicole.green)\
**Replies:** 1\
**Last updated:** [March 7, 2025, 5:29pm UTC](https://forum.code.org/t/app-lab-u4l07-variable-error-and-counts-not-showing-on-screen/40511 "2025-03-07T17:29:49Z")

</div>

Project Link: \[App Lab - Code.org\] Link to the project or level: \[replace with link to the curriculum or get the “Share” link to a project\] Please help… I keep getting an error message about my variables not being defi…

---

## [Moving a sprite all over a screen](https://forum.code.org/t/moving-a-sprite-all-over-a-screen/40500)

<div class="topic-metadata">

**Author:** [@stephanie.hodgson](https://forum.code.org/u/stephanie.hodgson)\
**Replies:** 2\
**Last updated:** [March 6, 2025, 5:29pm UTC](https://forum.code.org/t/moving-a-sprite-all-over-a-screen/40500 "2025-03-06T17:29:22Z")

</div>

I have a student who is working game lab. He has a sprite (basketball hoop) that moves up and down on the Y axis for the first screen. When he moves to the second screen, the sprite (basketball hoop) should move up and…

---

## [Shooter game debug](https://forum.code.org/t/shooter-game-debug/34543)

<div class="topic-metadata">

**Author:** [@GordonBrune](https://forum.code.org/u/GordonBrune)\
**Replies:** 4\
**Last updated:** [March 6, 2025, 1:38pm UTC](https://forum.code.org/t/shooter-game-debug/34543 "2025-03-06T13:38:06Z")

</div>

I’m a newbie CS teacher here just learning javascript myself, so can anyone help with this issue. Student is making a “shooter game.” Wants the “explosion” sprite show up when the arrow touches the gem but the explosion…

---

## [Sprite Lab Help with Remove](https://forum.code.org/t/sprite-lab-help-with-remove/40453)

<div class="topic-metadata">

**Author:** [@tdean1](https://forum.code.org/u/tdean1)\
**Replies:** 2\
**Last updated:** [March 5, 2025, 1:40am UTC](https://forum.code.org/t/sprite-lab-help-with-remove/40453 "2025-03-05T01:40:31Z")

</div>

I have a student creating in Sprite Lab and wants to only remove one of many sprites when two different ones touch… hope that makes sense… is there a way to code for the removal of only one. He has many of this particul…

---

## [Error in Flyer Game](https://forum.code.org/t/error-in-flyer-game/40480)

<div class="topic-metadata">

**Author:** [@langilla1](https://forum.code.org/u/langilla1)\
**Replies:** 6\
**Last updated:** [March 3, 2025, 5:31pm UTC](https://forum.code.org/t/error-in-flyer-game/40480 "2025-03-03T17:31:13Z")

</div>

We are unable to find the error that is not letting us go back to blocks. Please help!

---

## [Why isn't the sprite being removed?](https://forum.code.org/t/why-isnt-the-sprite-being-removed/40473)

<div class="topic-metadata">

**Author:** [@cpendley](https://forum.code.org/u/cpendley)\
**Replies:** 1\
**Last updated:** [March 1, 2025, 7:28am UTC](https://forum.code.org/t/why-isnt-the-sprite-being-removed/40473 "2025-03-01T07:28:16Z")

</div>

We are trying to have the coins be removed when the zebra touches them but they are not being removed. What can we do to fix this?

---

## [App Lab: Disable a button](https://forum.code.org/t/app-lab-disable-a-button/40466)

<div class="topic-metadata">

**Author:** [@michael.coyner](https://forum.code.org/u/michael.coyner)\
**Replies:** 1\
**Last updated:** [February 27, 2025, 7:36pm UTC](https://forum.code.org/t/app-lab-disable-a-button/40466 "2025-02-27T19:36:49Z")

</div>

For this app, instead of hiding a button, want to disable it. Is there a function to disable a button?

---

## [Set Decimal Places](https://forum.code.org/t/set-decimal-places/40449)

<div class="topic-metadata">

**Author:** [@michael.coyner](https://forum.code.org/u/michael.coyner)\
**Replies:** 3\
**Last updated:** [February 22, 2025, 4:00am UTC](https://forum.code.org/t/set-decimal-places/40449 "2025-02-22T04:00:51Z")

</div>

Hi- Working an ATM app in CSD Projects. Using the setNumber tool to display dollar amount in a label, however it drops the zeroes in the display i.e. 100.00 displays as 100. Is there a way to control the number of deci…

---

## [Lesson 21: Mini-Project - Side Scroller - score/health](https://forum.code.org/t/lesson-21-mini-project-side-scroller-score-health/40436)

<div class="topic-metadata">

**Author:** [@langilla1](https://forum.code.org/u/langilla1)\
**Replies:** 5\
**Last updated:** [February 20, 2025, 9:56am UTC](https://forum.code.org/t/lesson-21-mini-project-side-scroller-score-health/40436 "2025-02-20T09:56:08Z")

</div>

How do you get the score/health to go up or down by only one?

---

## [Spanish speaking student](https://forum.code.org/t/spanish-speaking-student/40377)

<div class="topic-metadata">

**Author:** [@michael.coyner](https://forum.code.org/u/michael.coyner)\
**Replies:** 3\
**Last updated:** [February 4, 2025, 9:49pm UTC](https://forum.code.org/t/spanish-speaking-student/40377 "2025-02-04T21:49:51Z")

</div>

Hi- Not sure this is the correct topic to post this question but…I have a Spanish speaking student with limited English. We’re using HS CSD curriculum in class. Does code.org offer a spanish version of CSD? Also, welcom…

---

## [Debugging: Laser Shoot doesn't move with spaceship](https://forum.code.org/t/debugging-laser-shoot-doesnt-move-with-spaceship/40359)

<div class="topic-metadata">

**Author:** [@sheri.mcnair](https://forum.code.org/u/sheri.mcnair)\
**Replies:** 2\
**Last updated:** [February 2, 2025, 1:36am UTC](https://forum.code.org/t/debugging-laser-shoot-doesnt-move-with-spaceship/40359 "2025-02-02T01:36:58Z")

</div>

\[Game Lab - Code.org\] What I expect to happen: The red laser should shoot from spaceship where ever spaceship is when player hits button to shoot What actually happens: The laser is stuck in the middle of the screen an…

---

## [Game Lab Debugging Issues](https://forum.code.org/t/game-lab-debugging-issues/40312)

<div class="topic-metadata">

**Author:** [@thelma.johnson](https://forum.code.org/u/thelma.johnson)\
**Replies:** 2\
**Last updated:** [January 17, 2025, 6:18pm UTC](https://forum.code.org/t/game-lab-debugging-issues/40312 "2025-01-17T18:18:36Z")

</div>

Two of my 7th grade students are having a few issues with their game. Can someone check this game and see what is causing the glitches? Thank you . -aircraft “fireball” shows up for no reason -“fireball (named crash…

---

## [Strikethrough Text on App Lab?](https://forum.code.org/t/strikethrough-text-on-app-lab/40306)

<div class="topic-metadata">

**Author:** [@mpestorius](https://forum.code.org/u/mpestorius)\
**Replies:** 1\
**Last updated:** [January 16, 2025, 12:15am UTC](https://forum.code.org/t/strikethrough-text-on-app-lab/40306 "2025-01-16T00:15:38Z")

</div>

Link to the project or level:(App Lab - Code.org) What I expect to happen: My student is creating a cafe simulator for the final project for the micro:bit unit. She wants to cross off the menu item if the correct button…

---

## [Changing background music for Game Lab](https://forum.code.org/t/changing-background-music-for-game-lab/40256)

<div class="topic-metadata">

**Author:** [@sdiaz](https://forum.code.org/u/sdiaz)\
**Replies:** 1\
**Last updated:** [December 19, 2024, 8:18pm UTC](https://forum.code.org/t/changing-background-music-for-game-lab/40256 "2024-12-19T20:18:07Z")

</div>

A student wants to have background music at the start of their game, and then change the music when the player’s health drops below a certain level. We are not able to get the original song to stop playing. The kids have…

---

## [Hiding and showing text](https://forum.code.org/t/hiding-and-showing-text/40249)

<div class="topic-metadata">

**Author:** [@skschiltz](https://forum.code.org/u/skschiltz)\
**Replies:** 7\
**Last updated:** [December 19, 2024, 4:10pm UTC](https://forum.code.org/t/hiding-and-showing-text/40249 "2024-12-19T16:10:00Z")

</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 yo…

---

## [CSD U6L16 - LEDs not lighting up](https://forum.code.org/t/csd-u6l16-leds-not-lighting-up/38067)

<div class="topic-metadata">

**Author:** [@agrant](https://forum.code.org/u/agrant)\
**Replies:** 5\
**Last updated:** [December 11, 2024, 6:18pm UTC](https://forum.code.org/t/csd-u6l16-leds-not-lighting-up/38067 "2024-12-11T18:18:17Z")

</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 yo…

---

## [Randomizing Animations in a Loop](https://forum.code.org/t/randomizing-animations-in-a-loop/40176)

<div class="topic-metadata">

**Author:** [@jrichard](https://forum.code.org/u/jrichard)\
**Replies:** 2\
**Last updated:** [December 6, 2024, 7:39pm UTC](https://forum.code.org/t/randomizing-animations-in-a-loop/40176 "2024-12-06T19:39:37Z")

</div>

My Code What I expect to happen: I would like my fruit to loop across the screen and change animations from one of five possible sprites every time they loop. If they touch each other, or Kirby, I would also like them t…

---

## [How can we make the Alien go around the screen continuously?](https://forum.code.org/t/how-can-we-make-the-alien-go-around-the-screen-continuously/40162)

<div class="topic-metadata">

**Author:** [@terickson1](https://forum.code.org/u/terickson1)\
**Replies:** 5\
**Last updated:** [December 3, 2024, 9:45pm UTC](https://forum.code.org/t/how-can-we-make-the-alien-go-around-the-screen-continuously/40162 "2024-12-03T21:45:40Z")

</div>

Link to the project or level:(Game Lab - Code.org) What I expect to happen: I would like the alien sprite to move around the outside of the screen continuously. What actually happens: After the first time around, the a…

---

## [Background not changing with score](https://forum.code.org/t/background-not-changing-with-score/40146)

<div class="topic-metadata">

**Author:** [@langilla1](https://forum.code.org/u/langilla1)\
**Replies:** 2\
**Last updated:** [November 25, 2024, 1:42pm UTC](https://forum.code.org/t/background-not-changing-with-score/40146 "2024-11-25T13:42:00Z")

</div>

We cannot figure out why the background is not changing when the score \>50

---

## [Visible property not working in if statements in draw function](https://forum.code.org/t/visible-property-not-working-in-if-statements-in-draw-function/40103)

<div class="topic-metadata">

**Author:** [@jdagostino](https://forum.code.org/u/jdagostino)\
**Replies:** 2\
**Last updated:** [November 15, 2024, 6:51pm UTC](https://forum.code.org/t/visible-property-not-working-in-if-statements-in-draw-function/40103 "2024-11-15T18:51:53Z")

</div>

I’m not sure why the note will not disappear from one if statement to another when we press the letter ‘d’ then ‘r’? Anyone know if it is something with the sprite.visible or the draw function I don’t know? any help wo…

---

## [Only one sprite will get hit by the players attack](https://forum.code.org/t/only-one-sprite-will-get-hit-by-the-players-attack/40102)

<div class="topic-metadata">

**Author:** [@kathrynpanzarella](https://forum.code.org/u/kathrynpanzarella)\
**Replies:** 2\
**Last updated:** [November 13, 2024, 8:05pm UTC](https://forum.code.org/t/only-one-sprite-will-get-hit-by-the-players-attack/40102 "2024-11-13T20:05:03Z")

</div>

When ever my player attacks, the hitbox only affects enemy1 and it doesn’t effect any other enemies The game What I expect to happen: When the player attacks, all enemies get hit and they lose hp What actually happens…

---

## [CSS Flex Question (Unit 2 Lesson 12)](https://forum.code.org/t/css-flex-question-unit-2-lesson-12/40061)

<div class="topic-metadata">

**Author:** [@jwilson25](https://forum.code.org/u/jwilson25)\
**Replies:** 3\
**Last updated:** [November 4, 2024, 10:02pm UTC](https://forum.code.org/t/css-flex-question-unit-2-lesson-12/40061 "2024-11-04T22:02:15Z")

</div>

Hi, I understand the styles added to the images class here. What I am not sure I can explain is why the page has 5 images / row. I can make the web screen narrow or wide and the 5 images remain in each row. Where is …

---

## [CSS Style Question - Precedence](https://forum.code.org/t/css-style-question-precedence/40043)

<div class="topic-metadata">

**Author:** [@jwilson25](https://forum.code.org/u/jwilson25)\
**Replies:** 3\
**Last updated:** [November 4, 2024, 9:38pm UTC](https://forum.code.org/t/css-style-question-precedence/40043 "2024-11-04T21:38:57Z")

</div>

I have styled the body tag with text-decoration: underline; I styled the p tag with text-decoration: none; I thought the p rule-set would override the body rule-set. What is my misunderstanding here? Link to th…

---

## [I wish to step through the program one line at a time](https://forum.code.org/t/i-wish-to-step-through-the-program-one-line-at-a-time/40027)

<div class="topic-metadata">

**Author:** [@dwhitfill](https://forum.code.org/u/dwhitfill)\
**Replies:** 1\
**Last updated:** [October 30, 2024, 12:30pm UTC](https://forum.code.org/t/i-wish-to-step-through-the-program-one-line-at-a-time/40027 "2024-10-30T12:30:05Z")

</div>

In the Debug Console when I click on “Step in” or “Step over”, nothing happens.

---

## [Layering Sprites and Shapes](https://forum.code.org/t/layering-sprites-and-shapes/40013)

<div class="topic-metadata">

**Author:** [@jrichard](https://forum.code.org/u/jrichard)\
**Replies:** 7\
**Last updated:** [October 28, 2024, 11:16pm UTC](https://forum.code.org/t/layering-sprites-and-shapes/40013 "2024-10-28T23:16:20Z")

</div>

This is in regards to Unit 3 Lesson 14 Mini Project Animated Scenes Link to my student’s project What I expect to happen: My student wants the baby elephant to descend down and to the left in front of the blue rectang…

[Previous page](https://forum.code.org/c/csd/debugging-help/393.md?page=1)

[Next page](https://forum.code.org/c/csd/debugging-help/393.md?page=3)
