I am currently making a game in which if the spikes touch the player the player gets destroyed. I looked around other questions and it seemed that people were using code like this:
function Update () {
function (OnCollisionStay (collision:Collision)){
if (collision.collider.tag == "Player"){
Destroy(collision.gameObject);
};
};
};
I was going to apply this script to all the objects that destroy the player.
Can I get some help please? I’m very new to this so forgive me if this is incredibly simple.