Object reference not set to an instance of...

Basically, all i am wanting to do is pass through a value from one script (BarScript) to another (EndScreen), this value being “0.**” and then change that into a percentage to display as text in a scene. I’m sure i shouldn’t be having this much trouble with it. The issue appears with the line “effiValue = BarScript.FillValue”. Thanks in advance

public class EndScreen : MonoBehaviour
{
    public BarScript barScript;
     private float effiValue;
     private double effiPercent;
     

    void Start()
    {
        
    }

    void Update()
    {
         effiValue = BarScript.FillValue;
         effiPercent = effiValue * 100;
        
        this.gameObject.GetComponent<Text>().text = "Efficiency: " + effiValue+ "%";
    }
}

instead of public BarScript barScript do
public GameObject barScript;
//replace line 15 with:
effiValue = barScript.GetComponent().FillValue;

Drop the Game object with BarScript into the inspector
OR
in the Start function just call this line…`

void Start()

{
barScript = FindObjectOfType<barScript > ();
}