# Issue with ammo.js in IoT web game game tutorial

**URL:** <https://forum.babylonjs.com/t/issue-with-ammo-js-in-iot-web-game-game-tutorial/33990>\
**Category:** Questions\
**Tags:** tutorial\
**Created:** [September 16, 2022, 4:53pm UTC](https://forum.babylonjs.com/t/issue-with-ammo-js-in-iot-web-game-game-tutorial/33990 "2022-09-16T16:53:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMIX2009](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mmix2009/32/26940_2.png) [@MMIX2009](https://forum.babylonjs.com/u/MMIX2009)\
**Post date:** [September 16, 2022, 4:53pm UTC](https://forum.babylonjs.com/t/issue-with-ammo-js-in-iot-web-game-game-tutorial/33990/1 "2022-09-16T16:53:34Z")

</div>

Hi,  
I am trying to replicate this tutorial on how to control an ESP8266 board with a BabylonJS-based app.  
Create IOT Web Games with Babylon.js  
YouTubedotcom: watch?v=CfcMtnAymR4

I get to the point where the target is rendered, but there is an error message related to the ammo.js library.

```auto
logger.ts:103 BJS - [09:35:12]: AmmoJS is not ready. Please make sure you await Ammo() before using the plugin.
e._LogEnabled @ logger.ts:103
logger.ts:103 BJS - [09:35:12]: Cannot read properties of undefined (reading 'setValue')
e._LogEnabled @ logger.ts:103

```

Has anyone run into a similar issue? How do i fix it?  
I have the reference to Ammo.js added in the index.html as indicated in the tutorial.

```auto
 <script src="https://cdn.babylonjs.com/ammo.js"></script>

```

Thanks.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/c/9ca577a7bfa560fa94dce332c4fdb24ce32e067e.jpeg)

Please do not forget to add a link to a [Playground](https://playground.babylonjs.com/) to get a faster answer:

> **[Make the Best Use of the Forum | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/developWithBjs/forum)**
>
> Learn about the best place to get help, the Babylon.js forum.

---

<div class="post-metadata">

**Author:** ![slin](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/slin/32/36084_2.png) [@slin](https://forum.babylonjs.com/u/slin)\
**Post date:** [September 16, 2022, 8:33pm UTC](https://forum.babylonjs.com/t/issue-with-ammo-js-in-iot-web-game-game-tutorial/33990/2 "2022-09-16T20:33:50Z")

</div>

Looks like same issue as the one in this thread: [Problem with Ammo.js](https://forum.babylonjs.com/t/problem-with-ammo-js/17052)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 19, 2022, 2:03pm UTC](https://forum.babylonjs.com/t/issue-with-ammo-js-in-iot-web-game-game-tutorial/33990/3 "2022-09-19T14:03:50Z")

</div>

As @slin mentionned, copying the solution if somebody else arrives here.

As the message mentioned in the error, you need to initialize ammo before creating the plugin.

`await Ammo();` or `Ammo().then(() => { ... }`

Unfortunately, this is the only way to stay uptodate with Ammo as they changed their initialization in their latest version.
