Hello, l was hoping somebody could help with this problem. I have a player which when it collides with a box collider (trigger), it should add 1 to my counter and then destroy so the player can’t interact with it anymore.
Add this to Player :
using UnityEngine;
public class Something : MonoBehaviour {
public int counter;
void OnTriggerEnter(Collider other){
if(other.gameObject.tag == "Whatever"){
counter++;
Destroy(other);
}
}
}