Solucionado.
void OnTriggerStay(Collider colstar){
if (colstar.tag == "Player") {
//Aquí estaba el error
if (!colstar.GetComponent<NetworkIdentity> ().localPlayerAuthority) {
return;
}
colstar.GetComponent<detectarobjetos> ().offlineultimoobjetocerca = this.gameObject;
}
}