# Animation adds NAN at the end (babylon GUI)

**URL:** <https://forum.babylonjs.com/t/animation-adds-nan-at-the-end-babylon-gui/30827>\
**Category:** Questions\
**Created:** [May 29, 2022, 10:41am UTC](https://forum.babylonjs.com/t/animation-adds-nan-at-the-end-babylon-gui/30827 "2022-05-29T10:41:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saba\_Mirzashvili](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/saba_mirzashvili/32/24283_2.png) [@Saba\_Mirzashvili](https://forum.babylonjs.com/u/Saba_Mirzashvili)\
**Post date:** [May 29, 2022, 10:41am UTC](https://forum.babylonjs.com/t/animation-adds-nan-at-the-end-babylon-gui/30827/1 "2022-05-29T10:41:28Z")

</div>

> **[Babylon.js Playground](https://playground.babylonjs.com/#CBGEQX%231056)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

when I’m trying to change url by animation, it doesn’t work bcs NaN is added at the end. I fixed that by checking the last 3 characters of the url string but it doesn’t work anyway.

am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![Saba\_Mirzashvili](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/saba_mirzashvili/32/24283_2.png) [@Saba\_Mirzashvili](https://forum.babylonjs.com/u/Saba_Mirzashvili)\
**Post date:** [May 29, 2022, 10:45am UTC](https://forum.babylonjs.com/t/animation-adds-nan-at-the-end-babylon-gui/30827/2 "2022-05-29T10:45:10Z")

</div>

after adding NaN checker funcionality:

> **[Babylon.js Playground](https://playground.babylonjs.com/#CBGEQX%231058)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [May 29, 2022, 11:10am UTC](https://forum.babylonjs.com/t/animation-adds-nan-at-the-end-babylon-gui/30827/3 "2022-05-29T11:10:55Z")

</div>

I’m afraid this will not work. You cannot blend in another image with an animation by replacing the source.  
You would need another technique for that. Like a node material. Let me just check because I sort of remember a recent topic of something similar… see if I can find it. Meanwhile, you can already forget about this option, it will never work (sry).

**Edit:** Here is a [revised version of your PG](https://playground.babylonjs.com/#CBGEQX#1059) using the animation control method. I created a duplicate of the image and run an animation to bring the front image to an alpha of 0. Simple enough, but I believe not the outmost in terms of best practice. Though, it works…

---

<div class="post-metadata">

**Author:** ![Saba\_Mirzashvili](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/saba_mirzashvili/32/24283_2.png) [@Saba\_Mirzashvili](https://forum.babylonjs.com/u/Saba_Mirzashvili)\
**Post date:** [May 29, 2022, 11:41am UTC](https://forum.babylonjs.com/t/animation-adds-nan-at-the-end-babylon-gui/30827/4 "2022-05-29T11:41:04Z")

</div>

Thanks for helping me diligently ❤

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [May 29, 2022, 11:46am UTC](https://forum.babylonjs.com/t/animation-adds-nan-at-the-end-babylon-gui/30827/5 "2022-05-29T11:46:43Z")

</div>

You’re welcome and have a beautiful sunday 🕶
