Error in Chapter 10 on page 252

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;

Double check the code i expect you are using FindGameObjectsWithTag rather than FindGameObjectWithTag (Object Vs. Objects)

Ah, most likely. My mistake.