# Vertex error and no colors on thin instances after upgrade

**URL:** <https://forum.babylonjs.com/t/vertex-error-and-no-colors-on-thin-instances-after-upgrade/28492>\
**Category:** Bugs\
**Created:** [March 17, 2022, 6:00am UTC](https://forum.babylonjs.com/t/vertex-error-and-no-colors-on-thin-instances-after-upgrade/28492 "2022-03-17T06:00:52Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [April 24, 2022, 9:04pm UTC](https://forum.babylonjs.com/t/vertex-error-and-no-colors-on-thin-instances-after-upgrade/28492/22 "2022-04-24T21:04:12Z")

</div>

Hmm, after copying over the instancesCount then it works:

```auto
clone._thinInstanceDataStorage.instancesCount = source._thinInstanceDataStorage.instancesCount;

```

For example here’s your [PG](https://playground.babylonjs.com/#RC2IAH#58) with this fix and also here’s a simpler [PG](https://playground.babylonjs.com/#217750#72) to show the issue (if you comment out line 45 then you can see how it isn’t working without setting the instancesCount).

EDIT: I started a new thread for this issue of needing to set the internal count directly since it turned out to be unrelated. 🙂

> [@Can't set thinInstanceCount for clone](https://forum.babylonjs.com/t/cant-set-thininstancecount-for-clone/29674):
>
> Heya, while investigating a separate issue on [this thread](https://forum.babylonjs.com/t/vertex-error-and-no-colors-on-thin-instances-after-upgrade/28492/22) I stumbled onto an issue where the thinInstanceCount for a clone can’t be set to any value except for zero. Here’s a simple PG to show the issue. It looks like a simple way to fix it is to fall back on using the source mesh to compute the clone’s numMaxInstances value, like on this PR for example.

---

_[View the full topic](https://forum.babylonjs.com/t/vertex-error-and-no-colors-on-thin-instances-after-upgrade/28492)._
