# Multiplayer extension problem

**URL:** https://forum.makecode.com/t/multiplayer-extension-problem/44116
**Category:** Help
**Created:** [May 22, 2026, 7:34pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116 "2026-05-22T19:34:21Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![codeFan413](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codefan413/32/26855_2.png) [@codeFan413](https://forum.makecode.com/u/codeFan413)
#### Post date: [May 22, 2026, 7:34pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/1 "2026-05-22T19:34:21Z")

</div>

It seems the “On button for player” returns a sprite assigned to the player and NOT the player as a number, but i need it as a number. What am i going to have to do?

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [May 23, 2026, 9:42pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/2 "2026-05-23T21:42:50Z")

</div>

you could put all the sprites in an array and use the find index of () block in the array section to get a number.

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [May 24, 2026, 12:26am UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/3 "2026-05-24T00:26:01Z")

</div>

what do you mean, have it as a number?

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [May 26, 2026, 11:30pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/4 "2026-05-26T23:30:04Z")

</div>

Looks like you need this block:

 ![Screenshot 2026-05-26 at 3.45.29 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/8/e/8ec4e31d05c2403bca6a6cb4e9d5e8daae9b8380.png)  
The “Index” options gives numbers 0-3 for the players and the “number” option gives 1-4

---

<div class="post-metadata">

### Author: ![codeFan413](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codefan413/32/26855_2.png) [@codeFan413](https://forum.makecode.com/u/codeFan413)
#### Post date: [May 26, 2026, 11:30pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/5 "2026-05-26T23:30:09Z")

</div>

if it’s player 1, return 1, if it’s player 2, return 2 etc

---

<div class="post-metadata">

### Author: ![codeFan413](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codefan413/32/26855_2.png) [@codeFan413](https://forum.makecode.com/u/codeFan413)
#### Post date: [May 27, 2026, 4:55pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/6 "2026-05-27T16:55:45Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/b/0/b04963e59966ee56a7c353eeacba935097311b19.png)  
why is this happening? removing the player variable from the block does make it not complain though

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [May 27, 2026, 9:36pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/7 "2026-05-27T21:36:05Z")

</div>

also what’s The extension url (or send a project with the extension added)? I can’t seem to find it

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [May 27, 2026, 9:36pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/8 "2026-05-27T21:36:08Z")

</div>

because the input of the green thing is “Player”, not “Sprite”. idk ask somebody else, but basically you need to define “player” as “Player” rather than “Sprite” (I’m kinda writting this in a javascript view)

---

<div class="post-metadata">

### Author: ![codeFan413](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codefan413/32/26855_2.png) [@codeFan413](https://forum.makecode.com/u/codeFan413)
#### Post date: [May 28, 2026, 5:40pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/9 "2026-05-28T17:40:54Z")

</div>

1. You cannot change this.

2.This is the featured multiplayer extension, found without searching anything

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [May 28, 2026, 10:15pm UTC](https://forum.makecode.com/t/multiplayer-extension-problem/44116/10 "2026-05-28T22:15:43Z")

</div>

is there a chance you have a variable called “player” already, that is a sprite? whenever I do what you have the error doesn’t show. also, I think this is the exact code you have shown:

 ![Screenshot_20260528-154949](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/d/2/d206079eb5dda9eaa1e2907f92517253cb84dfaf.png)

I got 0 errors, so it’s likely a player variable already defined.
