Unity NPC Dialogue Script doesn't work

Hi, I followed a Tutorial on how to create an NPC Dialogue. But it isn’t working. Everytime I go near the NPC, nothing shows up. Here’s the script:

using System.Collections;
using System.Collections.Generic;
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;

public class NPCInteraction : MonoBehaviour
{
public GameObject DialoguePanel;
public TextMeshProUGUI DialogueText;
public string[ ] dialogue;
private int index;
public float wordSpeed;
public bool PlayerIsClose;
public GameObject contButton;

void Start()
{

}

void Update()
{
if(Input.GetKeyUp(KeyCode.E) && PlayerIsClose)
{
if(DialoguePanel.activeInHierarchy)
{
zeroText();
}
else
{
DialoguePanel.SetActive(true);
StartCoroutine(Typing());
}
}
if(DialogueText.text == dialogue[index])
{
contButton.SetActive(true);
}
}

public void zeroText()
{
DialogueText.text = “”;
index = 0;
DialoguePanel.SetActive(false);
}

IEnumerator Typing()
{
foreach(char letter in dialogue[index].ToCharArray())
{
DialogueText.text += letter;
yield return new WaitForSeconds(wordSpeed);
}
}

public void NewLine()
{
contButton.SetActive(false);
if(index < dialogue.Length - 1)
{
index++;
DialogueText.text = “”;
StartCoroutine(Typing());
}
else
{
zeroText();
}
}

private void OnTriggerEnter(Collider other)
{
if(other.CompareTag(“Player”))
{
PlayerIsClose = true;
Debug.Log(“Hi”);
}
}

private void OnTriggerExit(Collider other)
{
if (other.CompareTag(“Player”))
{
PlayerIsClose = false;
zeroText();
}
}
}

I watched this Tutorial: