Hello everybody I was working on a recent project when I came across this problem. When I run it and I make this GameObject, “Player”, collide with “Coin” the console only outputs “Working 1.” Any suggestions help! Thank you so much!
The manual on tags does a much better job of explaining it than I could here in this post.
For now, you could just change your code to use the name instead of the tag:
if(other.gameObject.name == "Coin"){
But that might fall apart in the future if you have different coin prefabs (say blue and red) or instantiate them via code (then they’ll be called “Coin (Clone)”), so I’d still recommend you learn about tags and assign them a coin tag.