# 速度に応じて移動する

![](/files/-LAM17fivejcrXizA4yL)

速度(そくど)に応(おう)じて、キャラクターが移動(いどう)する機能(きのう)を追加(ついか)してみましょう。

## (1) スクリプト画面(がめん)を開(ひら)く

![](/files/-LAM17fvPcgsf_XATi4Q)

### (1-1) Sprite1をクリックする。

## (2) スクリプトを追加(ついか)する

![](/files/-LAM17gOyqkJ2NJkO5Zi)

## 注意(ちゅうい)!!

![](/files/-LAM17gcdI3ZgFpdBpDf)

変数(へんすう)を作(つく)る時(とき)は、このスプライトのみを選択(せんたく)してください。

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

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

![](/files/-LAM17h3xldhF2X8jHhf)

### (3-1) 右上(みぎうえ)の旗(はた)をクリックすると、Sprite1が右(みぎ)に移動(いどう)すること。


---

# 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/gravity/create_speed.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.
