# Set Tile At block isn't always setting the Tile At

**URL:** <https://forum.makecode.com/t/set-tile-at-block-isnt-always-setting-the-tile-at/2224>\
**Category:** Help\
**Created:** [May 26, 2020, 2:21am UTC](https://forum.makecode.com/t/set-tile-at-block-isnt-always-setting-the-tile-at/2224 "2020-05-26T02:21:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WTSMike](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@WTSMike](https://forum.makecode.com/u/WTSMike)\
**Post date:** [May 26, 2020, 2:21am UTC](https://forum.makecode.com/t/set-tile-at-block-isnt-always-setting-the-tile-at/2224/1 "2020-05-26T02:21:12Z")

</div>

Hi Gang,  
I’m trying to use the _set Tile At_ block to randomly place some collectible tiles across a level, but sometimes it won’t place the selected tile unless I’ve previously placed it onto the tilemap.

The work around is adding, saving and then removing the tile from the tilemap but that seems iffy at best. Am I missing something?

The code is [here](https://makecode.com/_fTwYRXdmE7vC).

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [May 26, 2020, 2:49am UTC](https://forum.makecode.com/t/set-tile-at-block-isnt-always-setting-the-tile-at/2224/2 "2020-05-26T02:49:16Z")

</div>

What’s happening to you is a known bug.

I know it’s on Github somewhere…

EDIT: Here was my post encountering the same issue

> [@Tilemaps won't update when changing tiles](https://forum.makecode.com/t/tilemaps-wont-update-when-changing-tiles/1160/2):
>
> WOW! That game is awesome! You have found a bug! I’ve opened an issue for it here: [https://github.com/microsoft/pxt-arcade/issues/1737](https://github.com/microsoft/pxt-arcade/issues/1737) Basically, the issue is that the open chest tile doesn’t appear anywhere in the tilemap. You can work around it by opening your tilemap, adding an open chest, and closing the tilemap editor. You can probably even delete the open chest from the map after is has been added at least once.

Here’s the Github issue:

> <https://github.com/microsoft/pxt-arcade/issues/1737>
>
> If you call \`set tile at\` on a tilemap and pass a tile that is not in the tilese…t for that specific map, the operation will be ignored. Here is a program that demonstrates the issue:
> 
> https://makecode.com/\_3bmewvhzihqx
> 
> The second tilemap does not have the light-green flowers in it, so the call to \`set tile at\` does nothing.

Although it has seemed to have been fixed in a recent version of MakeCode Arcade.
