# 3DGUI Button change size

**URL:** <https://forum.babylonjs.com/t/3dgui-button-change-size/19160>\
**Category:** Questions\
**Created:** [March 14, 2021, 2:57pm UTC](https://forum.babylonjs.com/t/3dgui-button-change-size/19160 "2021-03-14T14:57:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icyrockton](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/icyrockton/32/13964_2.png) [@Icyrockton](https://forum.babylonjs.com/u/Icyrockton)\
**Post date:** [March 14, 2021, 2:57pm UTC](https://forum.babylonjs.com/t/3dgui-button-change-size/19160/1 "2021-03-14T14:57:00Z")

</div>

I noticed a post with the same question before

[How to change size/shape of Holographic button? - Questions - Babylon.js](https://forum.babylonjs.com/t/how-to-change-size-shape-of-holographic-button/8787)  
Unfortunately, this code doesn’t run on typescript  
I got this error  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/b122d01f024ea8bfad183f88dd1f318baa942177.png)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/e/e1cc6ceda4cd2ecca3a1ffef62269681ea7bc177.png)

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [March 14, 2021, 4:37pm UTC](https://forum.babylonjs.com/t/3dgui-button-change-size/19160/2 "2021-03-14T16:37:22Z")

</div>

Not checking the source, but a child is a Node. You can have children of meshes which areof type Light, Camera, TranformNodes, AbstractMesh, Mesh, InstancedMesh, & Node.

You can either cast the [1]th element as an AbstractMesh, or use getChildMeshes() instead of getChildren(). That hardcoded [1], looks like crap code, which could break in the future though, or even now, since it looks like [1] is undefined
