# AttachInstanceToGameObject not working without a Rigidbody

**URL:** <https://qa.fmod.com/t/attachinstancetogameobject-not-working-without-a-rigidbody/16417>\
**Category:** Unity\
**Created:** [November 10, 2020, 12:40pm UTC](https://qa.fmod.com/t/attachinstancetogameobject-not-working-without-a-rigidbody/16417 "2020-11-10T12:40:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilber92](https://avatars.discourse-cdn.com/v4/letter/w/f19dbf/32.png) [@wilber92](https://qa.fmod.com/u/wilber92)\
**Post date:** [November 10, 2020, 12:40pm UTC](https://qa.fmod.com/t/attachinstancetogameobject-not-working-without-a-rigidbody/16417/1 "2020-11-10T12:40:10Z")

</div>

Good Afternoon!

I’ve found that the AttachInstanceToGameObject update the position when the rigidbody parameter is null. Is there a way to get a round this problem? We have an object that wants to be updated each frame but it doesn’t have a rigidbody on it.

Many thanks,  
Will

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [November 17, 2020, 5:23am UTC](https://qa.fmod.com/t/attachinstancetogameobject-not-working-without-a-rigidbody/16417/2 "2020-11-17T05:23:12Z")

</div>

You can use `GetComponent<Rigidbody>()` as the third parameter, and if the object does not have a Rigidbody it will pass in `null`. The reason you cannot just pass in `null` is because there are two versions of the function and it would not be able to tell which to use.
