Static variable work in one script but not in the other

So I have this static variable

public class GenerateCupScript : MonoBehaviour {
       public static string objectName;
       public void Start () {
              objectName = "Test";
       }
}

A script calling the variable

public class WaterTapScript : MonoBehaviour{
       public string objectName;
       void Start() {
              objectName = GenerateCupScript.objectName;
       }
}

And another script calling the same variable

public class BarForCup: MonoBehaviour{
        public string objectName;
        void Start() {
               objectName = GenerateCupScript.objectName;
        }
}

The problem is the WaterTapScript can call the value from the GenerateCup but the BarForCup can’t do that. If the BarForCup call GenerateCupScript.objectName it will return null, but the WaterTapScript will return “Test”. And this is how I tried to fix the problem but none work

1 attaching BarForCup
script to the same object the
GenerateCupScript is attached

2 attaching BarForCup script to the same
object the WaterTapScript is
attached
3 use Awake

4 public string objectName = GenerateCupScript.objectName;

5 call it at the same time in Awake, Start and using 4

Unless otherwise is instructed, the running order on scripts is quite random. What I think has happened is that one of the scripts trying to access the variable ran first, then the script with the variable, and at last, the script that actually works. In Edit > Project Settings > Script Execution Order you can change the order of which script are executed. All of your referencing happens in Start, or about the same time. Moving the GenerateCupScript to run before the rest might solve your problem.