void Update() { Scientist scientist = GameObject.FindObjectOfType <Scientist> (); if (scientist.Find(GameObject.FindObjectOfType <Inner>().gameObject, "Racer") != null) { ball = scientist.Find(GameObject.FindObjectOfType <Inner>().gameObject, "Racer").transform; transform.position = Vector3.Lerp(transform.position, ball.position + offset, t); } }