,How can I get my tag based collision to work?

Im trying to detect when something with the “Lava” tag collides with my player but my code isn’t working:
202269-image-2022-11-26-104429065.png

If someone could help me I would really appreciate it
:slight_smile:

Your code looks fine but I would question two things.

(1) Are you making a 2D game? If so you need OnCollisionEnter2D. (This is the most likely error.)

(2) Have you got the capitalisation of “Lava” correct? In other words have you set up your tag correctly?