I'm new to c# and coding, sorry if I sound like a noob... I don't know how to fix the waitforseconds error, and I don't know what's wrong.
public float restartDelay = 2f;
public TextMesh failText;
public TextMesh failTextGame;
private void Start()
{
failTextGame.text = "";
}
System.Collections.Generic.IEnumerable<bool> OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("Wall"))
{
failText.text = "Game Over!";
failTextGame.text = "Try Again";
yield return new WaitForSeconds(restartDelay);
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
}
}
}