# 左右に移動

![](/files/-LAM1-k3AlN5qxa6nBjT)

今(いま)までに作成(さくせい)したプログラムが、上下(じょうげ)の移動(いどう)だけしかできませんでした。

左右(さゆう)にも移動(いどう)できるようにしましょう!!

## (1) 左右(さゆう)へも移動(いどう)できるようにする

### (1-1) 左下(ひだりした)のBallをクリックする

### (1-2) 右上(みぎのうえ)のスクリプトタブをクリック

### (1-3) 下記(かき)スクリプトを追加(ついか)してください

![](/files/-LAM1-kWFh0xKXtvIUda)

**※ 「Yの速度(そくど)」変数(へんすう)を作るときは、「このSpriteのみ」にチェックを入れてください** **※ 「Xの速度(そくど)」変数(へんすう)を作るときは、「このSpriteのみ」にチェックを入れてください**

## (2) 確認(かくにん)する

<https://scratch.mit.edu/projects/78304898/>

![](/files/-LAM1-luAX8Czpcnyxhc)

### (2-1) 右上(みぎうえ)の緑色(みどりいろ)の旗(はた)をクリックする。地面(じめん)に衝突(しょうとつ)すると跳(は)ね返(かえ)ることを確認(かくにん)する。

## (3) Good!

![](/files/-LAM1-nARYV39XQDYUwd)

良(よ)くできました。次(つぎ)のステップに進(すすみ)みましょう!!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://firefirebook.firefirestyle.net/tennis_of_two/right_left.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
