How to change a score

So I have made a Canvas with a text object in it which is supposed to display a score. I have made a script but I don’t know how to reference it

public GameObject AmmoUi;
public  AmmoUi;


public AmmoUI myAmmoUI;

Try that. Then you should be able to drag the game object with the AmmoUI script on it onto this in the inspector.