Why won't the Score reset?

Hello. I am making a game that is for Android and is 2D. I am trying to figure out how to reset the gameScore when a button is pushed. The script I use for the score is

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class ScoreManager : MonoBehaviour
{
	public static int score;        // The player's score.
	
	
	Text text;                      // Reference to the Text component.
	
	
	void Awake ()
	{
		// Set up the reference.
		text = GetComponent <Text> ();


		
	}
	
	
	void Update ()
	{
		// Set the displayed text to be the word "Score" followed by the score value.
		text.text = "Score: " + score;
	}
}

The script I have made to simply reset the score is

using UnityEngine;
using System.Collections;

public class Slore : MonoBehaviour {

	// Update is called once per frame
	void OnMouseDown () {
		ScoreManager.score = 0;
	}
}

How can this be changed so that it actually sets the score to zero?

It may not be an actual answer to your question, but you should not make idle use of static variables and classes. It would be a better idea, to have a GameManager-class, which knows all your other managers (has ‘public ScoreManager scoreManager;’ etc.), and let that handle things.
Your new GameManager class:

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class GameManager : MonoBehaviour
    public ScoreManager scoreManager = new ScoreManager();
}

Then everything you make (monsters etc.) that has to interact with something else in the game, just has to have a reference to the GameManager in them. If you want that in your ‘Slore’-class, you can do:

public GameObject gameManagerObject; // this is the variable, that will be visible in the Inspector
private GameManager gameManager;

void Awake(){
    gameManager = gameManagerObject.GetComponent<GameManager>();
}

void OnClick () {
     gameManager.scoreManager.score = 0;
}

Then in the Inspector, you simply drag the GameObject from your scene, which has the GameManager script on it, onto the GameManagerObject ‘slot’ of the Slore object.

Since Slore is supposed to be a button, there’s already an event-system, that can help you do this, so you don’t need to attach your own script to the button. Simply drag the new gameobject with the GameManager-script on it to a new OnClick-event on your button, choose the GameManager-script and method you want, and any parameters (if there are any; in the case of your ResetScore(), there are no parameters). See the video DiegoSLTS posted, to see how this is done.

Also, I’d recommend not updating text.text every update. You only need to update it whenever the score changes. Plus, having static variables like that score, is bad practice. You should consider making your ScoreManager manage the score, instead of just having it just be a container for the score variable.

First, you should remove ‘static’ from your score-variable.
Then make methods in your ScoreManager like this:

public void ApplyScoreChange(int change){
    score += change;
    UpdateScoreText();
}

and one like this:

public void SetScore(int newScore){
    score = newScore;
    UpdateScoreText();
}

and one like this:

public void ResetScore(){
    score = 0;
    UpdateScoreText();
}

and one like this:

public void UpdateScoreText(){
    text.text = score;
}

Then, whenever you want to change the score, you know it’ll always be the same code doing the changes, and you can use these methods in your gameobjects, and even the OnClick() event on buttons.

Your OnMouseDown function is not being called, OnMouseDown works when clicking a GUIElement or something with a Collider.

If I understood you, you’re using a UI Button, but buttons don’t have a Collider component, and they’re not “GUIElement” instances. If you’re using a UI Button and want to call some function when it’s clicked you have to register the function on the “On Click” event of the button. Look at this: UI Button - Unity Official tutorials - YouTube

Make sure the function you want to call when clicking the button is public, or it won’t be shown as an option when trying to register a new function for the event.

EDIT: Just a suggestion, instead of calling

text.text = "Score " + score;

in the Update function (executed on every frame) you can just call some function that updates the score only when it’s changed. For example:

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class ScoreManager : MonoBehaviour
{
    public static int score; // The player's score.
    Text text; // Reference to the Text component.

    void Awake ()
    {
        text = GetComponent <Text> ();
    }

    public void SetScore (int newScore)
    {
        ScoreManager.score = newScore; //update the static score variable
        text.text = "Score: " + score;
    }
}

And when registering a new function to the OnClick event of the button you don’t need another script, you can select the SetScore function of ScoreManager, and since the function receives an int you can set up the event to send a “0” to it when it’s clicked.