# How to make two blocks work at once

**URL:** <https://forum.makecode.com/t/how-to-make-two-blocks-work-at-once/41180>\
**Category:** Help\
**Tags:** game, make, demo\
**Created:** [December 22, 2025, 12:13am UTC](https://forum.makecode.com/t/how-to-make-two-blocks-work-at-once/41180 "2025-12-22T00:13:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spike](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/spike/32/33316_2.png) [@Spike](https://forum.makecode.com/u/Spike)\
**Post date:** [December 22, 2025, 12:13am UTC](https://forum.makecode.com/t/how-to-make-two-blocks-work-at-once/41180/1 "2025-12-22T00:13:19Z")

</div>

Guys, how do i make two blocks function at once? I am trying to make game function where a wall toggles on and off every few seconds.

 ![The Simulator](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/f/e/fec5ed8046c332a0084490bd34f59249a8249776.jpeg)  
 ![The Code](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/d/6d7c45ddb04da726a3de98b899d5a129b96edbe3.jpeg)

Is there an easier way to do this or is there something I dont know about, please tell me

---

<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:** [December 22, 2025, 5:34pm UTC](https://forum.makecode.com/t/how-to-make-two-blocks-work-at-once/41180/2 "2025-12-22T17:34:23Z")

</div>

Switch blue to a 3rd temporary tile, switch red to blue, and then switch the 3rd temporary tile to red.

---

<div class="post-metadata">

**Author:** ![Iro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/iro/32/34749_2.png) [@Iro](https://forum.makecode.com/u/Iro)\
**Post date:** [December 22, 2025, 5:34pm UTC](https://forum.makecode.com/t/how-to-make-two-blocks-work-at-once/41180/3 "2025-12-22T17:34:46Z")

</div>

Try using a forever block with pause blocks. then it should work.

example(warning, this is meant for block code concept, this will not work as actual text code):

loop

{

(optional if

if myVar=0 then)

set wall [off] at all locations

replace all tiles with

pause until [100]

set wall [on] at all locations

replace all tiles with

}

---

<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:** [December 22, 2025, 5:41pm UTC](https://forum.makecode.com/t/how-to-make-two-blocks-work-at-once/41180/4 "2025-12-22T17:41:15Z")

</div>

make a boolean variable so that every time the code updates, it toggles the variable. if the variable is true, set blue walls and destroy red walls, otherwise set red walls and destroy blue walls
