Error while using a tutorial working code

The function that sends the mensage:

function OnMouseDown(){
  gameObject.Find("EscBox(Clone)").SendMessage("React", true);
  gameObject.Find("EscBoxExit(Clone)").SendMessage("React", true);
  gameObject.Find("EscBoxCancel(Clone)").SendMessage("React", true);
}

And the React function:

function React () {
  Destroy(gameObject.Find("EscBox(Clone)"));
  Status += -1.0;
}

function React () {
  Destroy(gameObject.Find("EscBoxExit(Clone)"));
  Status += -1.0;
}

function React () {
  Destroy(gameObject.Find("EscBoxCancel(Clone)"));
  Status += -1.0;
}

The gameObjects have a script called React, so I dont understand wheres the problem.!)

It means that EscBoxCancel(Clone) has no script that implements React function (if you did not remove any code from your example, otherwise check the correct line of code to find out which game object that doesn’t have React).

You need to make sure that the game object you are accessing has a script that implements React.

If you want to make this optional (that is, have nothing happen if the script doesn’t have a React function), you can use the overload that accept a SendMessageOption. See the docs. This is most likely not what you want to do, but it will get rid of the error. You most likely want to have a script on those objects that implements React.

Ex:

gameObject.Find("EscBoxCancel(Clone)")
          .SendMessage("React", SendMessageOptions.DontRequireReceiver);

The function that sends the mensage:

function OnMouseDown(){
  gameObject.Find("EscBox(Clone)").SendMessage("React", true);
  gameObject.Find("EscBoxExit(Clone)").SendMessage("React", true);
  gameObject.Find("EscBoxCancel(Clone)").SendMessage("React", true);
}

And the React function:

function React () {
  Destroy(gameObject.Find("EscBox(Clone)"));
  Status += -1.0;
}

function React () {
  Destroy(gameObject.Find("EscBoxExit(Clone)"));
  Status += -1.0;
}

function React () {
  Destroy(gameObject.Find("EscBoxCancel(Clone)"));
  Status += -1.0;
}

The gameObjects have a script called React, so I dont understand wheres the problem.