Parsing error

hi, i get the following error in 2 scripts i tried and wanted to know whats wrong: “error CS8025: Parsing error”, thanks.

  1. void Start () {
}  
  
void Update () {  
     
}  

void OnTriggerEnter2D(Collider2D other)  
{  
    if (other.gameObject.tag == new "Player")  
    {  
        GetComponent(MeshRenderer).enabled = false;  
    }  
}  
  1. void Start () {
}  

void Update () {  
if (Input.touchCount == 1)  
{  
    Vector3 wp = Camera.main.ScreenToWorldPoint(Input.GetTouch(0).position);  
    Vector2 touchPos = new Vector2(wp.x, wp.y);  
    if (collider2D == Physics2D.OverlapPoint(touchPos))  
    {  
        GetComponent(MeshRenderer).enabled = false;  

    }  
}

Like gif said, you need to remove the “new” from if (other.gameObject.tag == new "Player") so it’s if (other.gameObject.tag == "Player")

And, since this is C#, you get component with <>, not parenthesis. So change the calls to:

GetComponent<MeshRenderer>().enabled = false;