ontriggerenter2d is not working

i m working on 2d game

  ontriggerenter 2d is not working??

TouchControll.cs //player movement code

obstacle.cs

 public GameObject[] staticcube;       //store the 5 obstacle sprite 

void OnTriggerEnter2D(Collider2D other)
    {
        Debug.Log("My name is: " + gameObject.name + " - The name of the object that touched me is: " + other.gameObject.name);

        if (other.gameObject.tag == "player")
        {
            gameovertext.SetActive(true);                          //when my point touch obstacle i wan to game overtext true
        }
    }

Referance:

Imgur: The magic of the Internet obstacle.cs code put in obstacle object
Imgur: The magic of the Internet touchcontroll.cs code put in player object
Imgur: The magic of the Internet

I’m not sure, but script is attached to parent obstacle object that hasn’t any collider. Try to attach script to childs that have colliders as components.