I created a coin that has a particle effect and an add value to the score once you pick it up. I created a prefab of the coin and everytime I pick up the coin, all the other prefabs disappear but the score adds up for all the other coins. Any help?
CoinPickup.js
Coin Pick Up Issue
CoinPickup.js
Code (JavaScript):
- #pragma strict
- var coinEffect : Transform;
- var coinValue = 1;
- function OnTriggerEnter (info : Collider)
- {
- if (info.tag == "Player")
- {
- GameMaster.currentScore += coinValue;...