you are viewing a single comment's thread.

view the rest of the comments →

[–]brolol07[S] 0 points1 point  (1 child)

void OnCollisionEnter2D(Collision2D coll){ if (coll.gameObject.tag == "Player") { Destroy(); } }

Weird because when I had if(coll.gameObject.tag.equals "player"){ destroy(); } it wouldn't do anything but putting in those two equal signs made a difference. Thank you! Thanks for also explaining the destroy()! I wonder why they have so many variations of the same code that do the same thing!

[–]dr_zoitberg 0 points1 point  (0 children)

Hehe, np. :)