# Coding and Debugging Help

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

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

**Page:** 2

---

## [Render Distance for Sprites](https://forum.code.org/t/render-distance-for-sprites/41709)

<div class="topic-metadata">

**Author:** [@pluto](https://forum.code.org/u/pluto)\
**Replies:** 1\
**Last updated:** [February 1, 2026, 5:31am UTC](https://forum.code.org/t/render-distance-for-sprites/41709 "2026-02-01T05:31:22Z")

</div>

I was wondering if there is something for rendering sprites that’s only close to a player or rendering sprites that are in the canvas frame. I know I can use the dist(), but I’m using a loop to go through an array. The …

---

## [Animation Tab and Editing Code.org Images](https://forum.code.org/t/animation-tab-and-editing-code-org-images/34003)

<div class="topic-metadata">

**Author:** [@jnicol](https://forum.code.org/u/jnicol)\
**Replies:** 2\
**Last updated:** [January 27, 2026, 10:08am UTC](https://forum.code.org/t/animation-tab-and-editing-code-org-images/34003 "2026-01-27T10:08:34Z")

</div>

\*\*In the animated tab, I added a Code.org Car I found in the pre-given pictures. I want to duplicate the car 4 ways…up, down, left, right. I want to make my car look like it’s going the direction when I press the spe…

---

## [keyDown code not moving Sprite](https://forum.code.org/t/keydown-code-not-moving-sprite/41710)

<div class="topic-metadata">

**Author:** [@thelma.johnson](https://forum.code.org/u/thelma.johnson)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 11:04pm UTC](https://forum.code.org/t/keydown-code-not-moving-sprite/41710 "2026-01-14T23:04:05Z")

</div>

Link to the project or level: Game Lab - Code.org What I expect to happen: Sprite named Max to move down when space bar pressed. What actually happens: Sprite Max stays in the sky and doesn’t move down What I’ve tried…

---

## [Sprite not showing up in Game](https://forum.code.org/t/sprite-not-showing-up-in-game/41708)

<div class="topic-metadata">

**Author:** [@thelma.johnson](https://forum.code.org/u/thelma.johnson)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 7:59pm UTC](https://forum.code.org/t/sprite-not-showing-up-in-game/41708 "2026-01-14T19:59:27Z")

</div>

Link to the project or level: Game Lab - Code.org What I expect to happen: Student expected his boxer sprites he made to appear on the screen and not the rectangles What actually happens: rectangles appear instead of b…

---

## [How to make multiple check boxes work](https://forum.code.org/t/how-to-make-multiple-check-boxes-work/41632)

<div class="topic-metadata">

**Author:** [@knorton](https://forum.code.org/u/knorton)\
**Replies:** 3\
**Last updated:** [December 18, 2025, 12:14am UTC](https://forum.code.org/t/how-to-make-multiple-check-boxes-work/41632 "2025-12-18T00:14:28Z")

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

---

## [L14 Bubble 2 A-Error with \</body\> and \</html\> tags](https://forum.code.org/t/l14-bubble-2-a-error-with-body-and-html-tags/41474)

<div class="topic-metadata">

**Author:** [@maguireb](https://forum.code.org/u/maguireb)\
**Replies:** 3\
**Last updated:** [October 28, 2025, 9:12pm UTC](https://forum.code.org/t/l14-bubble-2-a-error-with-body-and-html-tags/41474 "2025-10-28T21:12:38Z")

</div>

Favorite Recipes Almond Croissants A delicate pastry filled with the sweet nutty goodness of almond paste, dusted with powdered sugar, and baked to a golden perfection. Ingredients: 1 sheet of puff pastry 1/2 cup …

---

## [Space Bar ending the Level](https://forum.code.org/t/space-bar-ending-the-level/41469)

<div class="topic-metadata">

**Author:** [@lpiazza](https://forum.code.org/u/lpiazza)\
**Replies:** 5\
**Last updated:** [October 24, 2025, 5:49pm UTC](https://forum.code.org/t/space-bar-ending-the-level/41469 "2025-10-24T17:49:35Z")

</div>

In CS Discoveries U3 L16, Level 7, the space bar is used to “boost” the emoji. Link to the project or level: Game Lab - Code.org What I expect to happen: The emoji will “boost”. What actually happens: The emoji boost…

---

## [Class code to Join current class](https://forum.code.org/t/class-code-to-join-current-class/41462)

<div class="topic-metadata">

**Author:** [@irene.milhorn](https://forum.code.org/u/irene.milhorn)\
**Replies:** 1\
**Last updated:** [October 24, 2025, 1:38pm UTC](https://forum.code.org/t/class-code-to-join-current-class/41462 "2025-10-24T13:38:01Z")

</div>

I have a new student who started after Fall Break. I synced my rosters and he still cannot join the class. I have no class code, it says N/A. I need help to get this student to join the class. Help!!! Link to the p…

---

## ["\\n" No Funciona](https://forum.code.org/t/n-no-funciona/41383)

<div class="topic-metadata">

**Author:** [@astrid.rodriguez.pub](https://forum.code.org/u/astrid.rodriguez.pub)\
**Replies:** 3\
**Last updated:** [October 11, 2025, 10:03pm UTC](https://forum.code.org/t/n-no-funciona/41383 "2025-10-11T22:03:21Z")

</div>

var tareas = \[“Bañarse”, “Vestirse”, “Desayunar”\]; onEvent(“button1”, “click”, function( ) { setText(“tareas”, tareas.join(“\\n”)); }); onEvent(“boton2”, “click”, function( ) { appendItem(tareas, getText(“agregar”)); …

---

## [App Lab Growing and Shrinking Code](https://forum.code.org/t/app-lab-growing-and-shrinking-code/41288)

<div class="topic-metadata">

**Author:** [@theresevalente](https://forum.code.org/u/theresevalente)\
**Replies:** 2\
**Last updated:** [September 16, 2025, 6:39pm UTC](https://forum.code.org/t/app-lab-growing-and-shrinking-code/41288 "2025-09-16T18:39:48Z")

</div>

I have a student who wants to code an object growing and shrinking while someone breathes in and out. Here is some of their code. Is this the best way to do this? var pause = 0; var setShapeSize = 50; function StartB…

---

## [How to code and switch between sprite backgrounds](https://forum.code.org/t/how-to-code-and-switch-between-sprite-backgrounds/41062)

<div class="topic-metadata">

**Author:** [@dralph1203](https://forum.code.org/u/dralph1203)\
**Replies:** 5\
**Last updated:** [July 21, 2025, 5:27pm UTC](https://forum.code.org/t/how-to-code-and-switch-between-sprite-backgrounds/41062 "2025-07-21T17:27:02Z")

</div>

The game plays well but now I would like a start and game over screens. When I use a sprite as a background, they do not show. I am using the “visible” block to turn on and off the sprites. I feel there is a better …

---

## [Student Syntax Error](https://forum.code.org/t/student-syntax-error/41033)

<div class="topic-metadata">

**Author:** [@langilla1](https://forum.code.org/u/langilla1)\
**Replies:** 3\
**Last updated:** [June 8, 2025, 3:04pm UTC](https://forum.code.org/t/student-syntax-error/41033 "2025-06-08T15:04:33Z")

</div>

I can not figure out how to fix this error. I thought maybe it was the way he named his sprites but that doesn’t seem to be it.

---

## [Collide Vs. Displace Interactions](https://forum.code.org/t/collide-vs-displace-interactions/41026)

<div class="topic-metadata">

**Author:** [@jwilson25](https://forum.code.org/u/jwilson25)\
**Replies:** 5\
**Last updated:** [June 9, 2025, 7:52pm UTC](https://forum.code.org/t/collide-vs-displace-interactions/41026 "2025-06-09T19:52:00Z")

</div>

Assume 2 sprites, car and truck. Is there a difference between these two interections? truck.displace.car and car.collide.truck Just wondering. Thanks, John

---

## [How To Know If Sprite Is Touching Background](https://forum.code.org/t/how-to-know-if-sprite-is-touching-background/41017)

<div class="topic-metadata">

**Author:** [@jwilson25](https://forum.code.org/u/jwilson25)\
**Replies:** 1\
**Last updated:** [June 4, 2025, 11:43am UTC](https://forum.code.org/t/how-to-know-if-sprite-is-touching-background/41017 "2025-06-04T11:43:31Z")

</div>

A student would like to know when a car sprite is touching a road , which will be a sprite on top of the background (bg). I thought a test for car.istouching.bg might be false if the car were touching the road sprite on…

---

## [Sprite not moving in Game Lab](https://forum.code.org/t/sprite-not-moving-in-game-lab/40997)

<div class="topic-metadata">

**Author:** [@rebecca.campbell](https://forum.code.org/u/rebecca.campbell)\
**Replies:** 1\
**Last updated:** [May 29, 2025, 7:13pm UTC](https://forum.code.org/t/sprite-not-moving-in-game-lab/40997 "2025-05-29T19:13:18Z")

</div>

\*\*I expect that after 2 seconds the wolf will appear and start moving to the left. \*\*What actually happens is that the wolf appears but does not move. \*\*What I’ve tried: changing it to “while”.

---

## [Help with sound in an "if" block in Game Lab](https://forum.code.org/t/help-with-sound-in-an-if-block-in-game-lab/40930)

<div class="topic-metadata">

**Author:** [@rebecca.campbell](https://forum.code.org/u/rebecca.campbell)\
**Replies:** 1\
**Last updated:** [May 24, 2025, 2:07pm UTC](https://forum.code.org/t/help-with-sound-in-an-if-block-in-game-lab/40930 "2025-05-24T14:07:23Z")

</div>

(Game Lab - Code.org) \*\*The sound file, “biggie cheese.mp3” should play only when the two burger sprites overlap. \*\*As is, no sound plays. If I move the “if” block into the draw loop it plays when they overlap, but sou…

---

## [Collision detection not working](https://forum.code.org/t/collision-detection-not-working/40931)

<div class="topic-metadata">

**Author:** [@michael.coyner](https://forum.code.org/u/michael.coyner)\
**Replies:** 1\
**Last updated:** [May 23, 2025, 4:22pm UTC](https://forum.code.org/t/collision-detection-not-working/40931 "2025-05-23T16:22:22Z")

</div>

Not sure why collsion detection isn’t working for bullet/enemy when I generate new instances of each…

---

## [AI Model App help](https://forum.code.org/t/ai-model-app-help/40903)

<div class="topic-metadata">

**Author:** [@stephanie.hodgson](https://forum.code.org/u/stephanie.hodgson)\
**Replies:** 2\
**Last updated:** [May 21, 2025, 12:39pm UTC](https://forum.code.org/t/ai-model-app-help/40903 "2025-05-21T12:39:07Z")

</div>

My students have created this app. When they are on the screen where they make their choices and click the continue button, nothing happens. They added an on event button for the click and put the if loops inside tha…

---

## [Monster "floating" in CSD 3.21](https://forum.code.org/t/monster-floating-in-csd-3-21/40739)

<div class="topic-metadata">

**Author:** [@langilla1](https://forum.code.org/u/langilla1)\
**Replies:** 2\
**Last updated:** [May 14, 2025, 4:35pm UTC](https://forum.code.org/t/monster-floating-in-csd-3-21/40739 "2025-05-14T16:35:05Z")

</div>

My student expects the "pink"to go up when she hits the key up button but it’s seems to be just floating up.

---

## [How are projects getting featured on the project screen?](https://forum.code.org/t/how-are-projects-getting-featured-on-the-project-screen/33926)

<div class="topic-metadata">

**Author:** [@IMPixel](https://forum.code.org/u/IMPixel)\
**Replies:** 6\
**Last updated:** [April 30, 2025, 2:43am UTC](https://forum.code.org/t/how-are-projects-getting-featured-on-the-project-screen/33926 "2025-04-30T02:43:20Z")

</div>

I would like to understand how are projects getting on the top of the projects list. here you can see that there are 8 projects that are “featured” on the screen. Those stay on the top for a long time. I’ve often see…

---

## [Sprite Width And Height Unaffected By Scale Value?](https://forum.code.org/t/sprite-width-and-height-unaffected-by-scale-value/40693)

<div class="topic-metadata">

**Author:** [@jwilson25](https://forum.code.org/u/jwilson25)\
**Replies:** 5\
**Last updated:** [April 28, 2025, 2:02am UTC](https://forum.code.org/t/sprite-width-and-height-unaffected-by-scale-value/40693 "2025-04-28T02:02:13Z")

</div>

Hi, This project shows that a sprite’s width and height are NOT affected by the scale of the sprite. The width and height seem to reflect the ORIGINAL width and height and not the ACTUAL width and height of the scaled s…

---

## [Game Lab, no sprite depth auto increment](https://forum.code.org/t/game-lab-no-sprite-depth-auto-increment/40640)

<div class="topic-metadata">

**Author:** [@fshaul](https://forum.code.org/u/fshaul)\
**Replies:** 3\
**Last updated:** [April 12, 2025, 12:12am UTC](https://forum.code.org/t/game-lab-no-sprite-depth-auto-increment/40640 "2025-04-12T00:12:09Z")

</div>

For Game Lab Documentation / sprite.depth Here’s my testing code, note that console shows sprites with identical depth values, no auto incrementing seems to be occurring / which the document suggests should happen. A…

---

## [Sprite repeat loop](https://forum.code.org/t/sprite-repeat-loop/40632)

<div class="topic-metadata">

**Author:** [@leslie.dillon](https://forum.code.org/u/leslie.dillon)\
**Replies:** 1\
**Last updated:** [April 5, 2025, 2:12pm UTC](https://forum.code.org/t/sprite-repeat-loop/40632 "2025-04-05T14:12:04Z")

</div>

\[Game Lab - Code.org\] \[Link to the project or level: \[replace with link to the curriculum or get the “Share” link to a project\]\] What I expect to happen: I want the sprite on line 107-124 to continuously move in a squa…

---

## [Debug-Sprite Background](https://forum.code.org/t/debug-sprite-background/40624)

<div class="topic-metadata">

**Author:** [@leslie.dillon](https://forum.code.org/u/leslie.dillon)\
**Replies:** 2\
**Last updated:** [April 2, 2025, 6:21pm UTC](https://forum.code.org/t/debug-sprite-background/40624 "2025-04-02T18:21:56Z")

</div>

https://studio.code.org/projects/gamelab/F\_hkEi2nANvr00DoCmnT3EeGj4dgpytlMNjQLfEmjEY \*\*Link to the project or level:\*\* Lesson 28 Bubble 11 \*\*What I expect to happen:\*\*The sprites are not shoiwng up \*\*What actually happ…

---

## [Miscolored Blocks](https://forum.code.org/t/miscolored-blocks/40133)

<div class="topic-metadata">

**Author:** [@voisinet](https://forum.code.org/u/voisinet)\
**Replies:** 6\
**Last updated:** [March 27, 2025, 8:10pm UTC](https://forum.code.org/t/miscolored-blocks/40133 "2025-03-27T20:10:56Z")

</div>

Haven’t come across this, what are these blocks where the color is a bit off. Like it is the right color, but faded?

---

## [Lesson 28 Final Project!](https://forum.code.org/t/lesson-28-final-project/40582)

<div class="topic-metadata">

**Author:** [@troy](https://forum.code.org/u/troy)\
**Replies:** 2\
**Last updated:** [March 21, 2025, 4:01pm UTC](https://forum.code.org/t/lesson-28-final-project/40582 "2025-03-21T16:01:45Z")

</div>

\[Game Lab - Code.org This student’s score is not working. I have remixed and add a different sprite for the ball to make sure it wasn’t the fact that it was scaled so small. I have several other students who have used …

---

## [Lesson 28 Final Project](https://forum.code.org/t/lesson-28-final-project/40573)

<div class="topic-metadata">

**Author:** [@troy](https://forum.code.org/u/troy)\
**Replies:** 1\
**Last updated:** [March 19, 2025, 5:37am UTC](https://forum.code.org/t/lesson-28-final-project/40573 "2025-03-19T05:37:01Z")

</div>

This student is trying to get bullet2 and bullet3 to follow the enemy and enemy2 after the enemy has been shot by the jet. We do not know what else to try. Thanks for the help and support!

---

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

<div class="topic-metadata">

**Author:** [@troy](https://forum.code.org/u/troy)\
**Replies:** 1\
**Last updated:** [March 19, 2025, 5:12am UTC](https://forum.code.org/t/lesson-28-final-project-design-a-game/40568 "2025-03-19T05:12:08Z")

</div>

When the student uses the fish to press on the food, the food will bounce off the edge once or twice and then go completely off the screen. We want the fish food to stay on the screen and not go off the screen which i…

---

## [Sprite is not appearing no matter what](https://forum.code.org/t/sprite-is-not-appearing-no-matter-what/40562)

<div class="topic-metadata">

**Author:** [@jyayad](https://forum.code.org/u/jyayad)\
**Replies:** 4\
**Last updated:** [March 18, 2025, 1:39am UTC](https://forum.code.org/t/sprite-is-not-appearing-no-matter-what/40562 "2025-03-18T01:39:10Z")

</div>

We are trying to make 3 sprites appear on the screen so we can edit their size and use them in our game. Our project is very simple. But suddenly, the sprites are not appearing. They’re not invisible, and I checked th…

---

## [Interactive Animations Game](https://forum.code.org/t/interactive-animations-game/40557)

<div class="topic-metadata">

**Author:** [@rbowens2](https://forum.code.org/u/rbowens2)\
**Replies:** 1\
**Last updated:** [March 17, 2025, 7:04pm UTC](https://forum.code.org/t/interactive-animations-game/40557 "2025-03-17T19:04:20Z")

</div>

Student want’s chip bag and banana peel sprites to respawn at the top of the screen when they touch “Critter”. He also wants to use a score variable and have score go up by one each time critter touces one of the object…

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

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