Since you already know the gameObject you want to reference and the script name in that gameObject, I think you could just do DudeGameObject.GetComponent(MyVariableScriptName) and then follow the 2nd link i posted. Something like:
Component attachedScript = DudeGameObject.GetComponent(MyVariableScriptName);
int myValue = (int)( attachedScript.GetType().GetField(MyFloatVariableName).GetValue(attachedScript);)
public “NAMEOFSCRIPT” “Name whatever you want it to be”
So for example
public PlayerHealth pHealth;
Then in your Update or whatever can can do something like,
pHealth.Die = true;
^^ That’s how to access a bool.
But everything has to be in PUBLIC to access.
But aside from that, all you have to do is drag and drop the script/Object containing the script into the pHealth slot.