I used this code:
void OnCollisionEnter(Collision Collider){
if(transform.collider.gameObject.tag == "dna"){
DNA += 1.0f;
Destroy(collider.gameObject);
}
}
The expected outcome is that when the object this script is on touches an object with the “dna” tag, it will add to the “DNA” variable, and destroy the object with the “dna” tag. Neither of these things work, any ideas or suggestions?