Ontrigger isn't working


I have an enemy that creates areas that hurt you. I use an OnTrigger function, but if the area that is created occupies the same place as the character (and if he doesn’t move), he remains unhurt.

Any ideas to correct this?


Have u attached collider to this area and set it as a trigger?

Yup, code would be most helpful!