How do you know if OnTriggerEnter occurred in script A and then increment a value in Script B because of it?

I am making a multiplayer game and I have a score script attached to the player, so when that player enters a sphere with a collider, it increments a value in his script.

Sorry if this doesn’t make any sense.

this is the sphere code

function OnTriggerEnter(other : Collider){
	Debug.Log("Trigger Entered");
	renderer.enabled = false;
	collider.isTrigger = false;
	collider.enabled = false;
	//yield WaitForSeconds ( Random.Range(1.0, 10.0));
	yield WaitForSeconds (3);
	renderer.enabled = true;
	collider.isTrigger = true;
	collider.enabled = true;
} 

and this is the player code

var score:int = 0;
var opScore:int = 0;
var sphereSettingsInstance:sphereSettings;

if(sphereSettingsInstance.OnTriggerEnter()){
	score++;

}



function OnGUI () {
	if(networkView.isMine){
		GUI.Label (Rect (10, 10, 100, 20), "Your score is: " + score);
		GUI.Label (Rect (100, 100, 200, 20), "Opponents score is: " + opScore);
	}
		
	
}

You can use a static variable in player class and increment it in function OnTriggerEnter. Although I don’t know if it is the best solution.

the short story is your going to get the script B component from inside script A.

Unity Gems has lots of good information on newbie questions and answers.

What are Script A and Script B?

What is the point of this line : collider.isTrigger = false;?

To debug, you can use Debug.Log(string) function to have some debug info and you can also put some breakpoints in your script.