void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.name == "Panda") { theScoreManager.coinWasPicked = true; //thescoremanager.cs function add score adds the value to the score theScoreManager.AddCoins(coinValue); //the coin dissappears gameObject.SetActive(false); player.PandaGoldFlash(); } }