Explosion renders fine on Computer, NullReference (SOLVED)

In its most basic form I am trying to make it so that whenever the user pushes a 3d button the explosion from the startrooper example is rendered. I do this with the following script, named click, which is attached to the button. Also the explosion is connected from my assets (its not in the scene yet).

Click.js:

var explosion: GameObject;
public var excellentLoc: GameObject;
function Update () {
if (Input.GetMouseButtonDown (0)) {

var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit: RaycastHit;
          if (collider.Raycast (ray, hit, 100)) {
    Instantiate(explosion,excellentLoc.transform.position,excellentLoc.transform.rotation);
		
            }
     }
}

Now when I do this on the computer, no problem works as expected, however when I do it on the iPhone xCode throws the following

NullReferenceException occured in:
IP 0x727868 at offset 0x1c8 of method Click:Update () (0x7276a0 0x727954)[domain 0x1509e70 - UnityDomainLoad.exe]

I have made it so there is nothing in my scene except the button and the explosion, just to see if it was a memory issue, however still the same results. Why can I instantiate the explosion on the computer but not the iPhone? It works fine in the StarTrooper Demo on the phone.

Turns out that for some reason a box collider(excellentLoc) registers its location fine on the computer, but on the iPhone seems to thrown an exception. Don’t know if this is a bug in Unity or what, but I fixed it by simply changing the instantiate line to manual coordinates and rotations.

Update: Turns out that excellentLoc was tagged as EditorOnly, and apparently EditorOnly means it is ignored on the phone.

So what are the actual updated lines of code? I’m curious because I’m just learning.