In the Start() function, the book tells us to find the GameObject with the tag “Player”.
player = GameObject.FindGameObjectWithTag(“Player”).transform;
This produces an error, as the result from FindGameObjectWithTag() returns an array, not a GameObject.
Solved by writing the following:
player = GameObject.FindGameObjectWithTag(“Player”)[0].transform;