Quantcast
Channel: Answers by "The_Magical_Kiwi"
Viewing all articles
Browse latest Browse all 29

Answer by The_Magical_Kiwi

$
0
0
// Destroy ourselves Destroy(gameObject); if (Sparkles) { Instantiate(Sparkles, transform.position,transform.rotation); } if (Coin) { Instantiate(Coin, transform.position,transform.rotation); } It looks like you are instantiating the coin after you have destroyed the object that is spawning it, you mind find it can either no longer spawn the coin because the script has been deleted along with the gameobject, or that it can't get the game objects position/rotation for the same reason. I could be wrong of course, I have a feeling it would throw an exception if this was the problem.

Viewing all articles
Browse latest Browse all 29

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>