# ラケットを上下に移動させる

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

![](/files/-LAM19aP1cmWiqircLHV)

はい、ラケットを作(つく)ることができました。しかし、まだ何(なに)も動作(どうさ)しません。

「上(うえ)キーを押(お)したら上(うえ)に移動(いどう)する」「下(した)キーを押(お)したら下(した)に移動(いどう)する」といった機能(きのう)を追加(ついか)してみましょう。

## (1)赤色(あかいろ)ラケットにスクリプトを追加(ついか)する

上下(じょうげ)に移動(いどう)するスクリプトを追加(ついか)しましょう

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

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

![](/files/-LAM19bFf52iUSYI6p-j)

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

![](/files/-LAM19bdqOPF6_KSnXN1)

## (2) 青色(あおいろ)ラケットにスクリプトを追加(ついか)する

赤色(あかいろ)ラケットにスクリプトを追加(ついか)したように、青色(あおいろ)にラケットにスクリプト画面(がめん)を開(ひら)いて、下記(かき)スクリプトを追加(ついか)してください。

![](/files/-LAM19cJoQRhsfrOL7fO)

## (3) 確認してみよう

![](/files/-LAM19dQgEh3UnzsraO3)

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

#### (3-1) 右上(むぎうえ)の緑色(みどりいろ)の旗(はた)をクリックしてください

#### (3-2) 上(うえ)キーを押(お)すと赤色(あかいろ)のラケットが上(うえ)に移動(いどう)します

#### (3-3) 下(した)キーを押(お)すと赤色(あかいろ)のラケットが下(した)に移動(いどう)します

#### (3-4) Aキーを押(お)すと青色(あおいろ)のラケットが上(うえ)に移動(いどう)します

#### (3-5) Zキーを押(お)すと青色(あおいろ)のラケットが下(した)に移動(いどう)します

## (4) Good !!

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

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


---

# 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/pong/readme02.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.
