Bounce Off the Defender

Make the ball bounce back if it hits the defender.

Click to choose the ball.

Add these blocks to check if ball is touching the panda.

Drag out a glide block and add it to the script:

Type in the same numbers as in the beginning of the script. This will make the ball glide back to the starting point.

Make the ball stop when it gets back to the starting point.

Click the Control category. Drag out a stop block, and choose 'this script' from the drop-down menu:

Add this script inside the repeat block:

You can experiment to see what happens if you remove the stop block.

Tip: Any blocks you add after 'stop this script' will not run. Next, enhance and customize