Edit bool on another script and object.

I have been looking for a specific answer for this question, while I have found some similiar nothing for this specific thing. Or at least nothing similiar enough to work… or I am not looking for the right question.

ObjectA instantiates ObjectB which has its own script (ScriptB) and has the tag TagB (If needed)

I need to change a bool within ObjectB’s script from the script on ObjectA (ScriptA).

I know that I do not have much to go on, or to give you to go on, but I really have no idea where to go with this (Have tried way to many things already).

public class blockProperties : MonoBehaviour {

	public bool timer;
	scriptB ScriptB;
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		timer += Time.deltaTime;
		
		if (timer >= 5f){
			ScriptB.freezeY = false;
		}
		
		
	}
}

ObjectB’s script

public class scriptB : MonoBehaviour {

	public bool freezeY = true;	
	
	// Use this for initialization
	void Start () {

	}
	
	// Update is called once per frame
	void Update () {
		if (freezeY == false)
		{
			GetComponent<Rigidbody>().constraints &= ~RigidbodyConstraints.FreezePositionY;
			
		}    		
	}
}

Calling from another script is like this:

Public [ScriptName] [Variable];

Void Start ()
{
[Variable].AmIAmazing = true;
}

If you need me to write your code just ask, I’m just in a bit of a rush at the moment.