The variable othertransform of Prefab has not been assigned

Hi everyone

I want to make a GUI button which instantiates a prefab which uses the distance between the player and the prefab itself to modify variables. But when I try to assign the variable othertransform, the transform of the player, the inspector doesn’t recognize it. So, how do I assign the variable othertransform from within a script. My player is just the original 3rd Person Controller and it has a tag called Player. These are my scripts:
This is the object I want to instantiate

var mytransform : Transform;
var othertransform : Transform;

function Update (){

if(Vector3.Distance(mytransform.position, othertransform.position) < 100){
AttackScript.interval = 3;
MpBasedAttackScript.interval = 5;
AttackScript.interval = 5;
MpBasedAttackScript.interval = 10;
Destroy (gameObject);

And this is the script I use to generate my button and to instantiate the prefab:

var instantiatedobject : GameObject;
var spawnplace : Transform;

function OnGUI () {
var instance : GameObject = Instantiate(instantiatedobject, spawnplace.position, spawnplace.rotation);

Please help me solve this problem.

Fine! Please don’t tell me how. I could need it x__x

I just instantiated a trigger. When the player enters the trigger the variable is changed. I still don’t know why I wanted to use Vector3.distance. It works terrible for me, triggers are way better to use.