variable and collision question...

Hello. This probably sounds odd but how would I accomplish the following scenario: A collides with B (where B is one of several instantiated clones).When they collide, the script attached to A detects the collision and subtracts a value from a variable in a script attached to B(but only in that specific instance of object B, the rest of the variables in the rest of the B clones are left unchanged). Basically something like this:

function OnTriggerEnter(other: Collider){
	if (other.collider.name == "B(Clone)"){B(Clone).Variable-=1;}
}

I know the easy solution would be to just handle everything in the B script, unfortunately due to a series of needing to detect certain things and a bunch of complex script references I don’t want to get into, that wont work.
Thanks

Why not have a function in script b that subtracts 1 from your var, then just send a message to that collided object if it passes your tag test.

Semi puesdo code:

Ontriggerenter( other : col…)
{
If(other.transform.name==“B(clone)”
{
other.transform.sendmessage(“sub_one_from_var_buddy”, sendmessageoptions.dontrequirereciever),
}
}