Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

arrow_back Bug Fix: Land on Your Feet...or Not


Currently, the sprite will stay on the platform no matter what body part is touching it.

This is because of how it’s programmed.

The if statement that moves the sprite down reads: “If touching sprite.”

It doesn’t make sense for the sprite to stay on the platform if another body part, like its head, is touching it. In this step, you’ll change the program so the sprite only stays on the platform when its feet are touching it.

The best way to check if part of a sprite is touching another sprite is to use a color.

To do this, you’ll need to give the sprite’s feet a unique color.

You can make the bottom of the sprite any color you want.

Depending on what your sprite looks like and how it’s shaped, you may need to get creative with the pen or line tool to give the bottom of the sprite a unique color.

Now, instead of saying “if not touching the color black move down,” instead, put a "color is touching" block from the Sensing menu.

Now, it should say "if the color green" (which is the color of this sprite’s shoes) is not touching the color black, then move down.”

Once you’ve programmed this, try it to see if it works!

If the sprite is touching the platform with anything but its shoes, it keeps falling.

If the green shoes are touching the platform, this sprite doesn’t fall.Perfect!

Choose an Add-On
Time to Celebrate!
Create a wild winning celebration using some of these ideas.
Moving Platforms
Make your game more challenging by creating moving platforms.
Shrinking Platforms
Create a shrinking platform to increase your game's difficulty.
Splash! You Lose
Create a way for the player to lose in your game.
Add Some Tunes
Add some background music to your game.
Bug Fix: Land on Your Feet...or Not
Fix the bug that allows things other than a sprite's feet to keep it on a platform.
arrow_backward Back
Next arrow_forward
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!