# 対象をプレイヤーのところへテレポートさせる（mobs.teleportToPlayer）

> エンティティをプレイヤーにテレポートします。

- カテゴリ：モブ（mobs）
- ブロック：@a を@s の元へテレポート
- URL：https://makecode.minecraft-okinawa.com/reference/mobs/teleport-to-player/
- Pythonでの名前：mobs.teleport_to_player
- 公式データ取得日：2026-11-13
- 動作確認：確認待ち

## JavaScript

```javascript
mobs.teleportToPlayer(
    mobs.target(ALL_PLAYERS),
    mobs.target(LOCAL_PLAYER)
)
```

## Python

```python
mobs.teleport_to_player(mobs.target(ALL_PLAYERS), mobs.target(LOCAL_PLAYER))
```

## 引数

| 名前 | 値 | 意味 |
|---|---|---|
| target | ターゲットセレクター | どのエンティティがテレポートされるのかを決定するターゲットセレクター |
| destination | ターゲットセレクター | どのプレイヤーにエンティティをテレポートするのかを決定するターゲットセレクター |

## 使用例

### Teleport all zombies to the current player. Run!

```javascript
mobs.teleportToPlayer(
    mobs.entitiesByType(mobs.monster(MonsterMob.Zombie)),
    mobs.target(LOCAL_PLAYER)
);
```

```python
mobs.teleport_to_player(mobs.entities_by_type(mobs.monster(ZOMBIE)),
    mobs.target(LOCAL_PLAYER))
```

## 出典

- [MakeCode for Minecraft 公式リファレンス（mobs.teleportToPlayer）](https://minecraft.makecode.com/reference/mobs/teleport-to-player)

執筆：鈴木孝昌（現役プロジェクトマネージャー／マイクラカップ指導者）／運営：沖縄マイクラ部 プログラミングスクール「クロスウェーブ」（https://minecraft-okinawa.com/）