// Use this for initialization void Start() { player = GameObject.Find("Player"); PlayerStart ps = player.GetComponent <PlayerStart>(); DialogueBox db = player.GetComponent <DialogueBox>(); db.SearchDialogueBox(); ps.ChangePosition(); }