I’m getting a “NullRefrenceException” error with to following line of code:

mousePos = camera.Main.ScreenToWorldPoint(Input.mousePosition);

(playerPos is simply a var, defined in a different spot in the script)

Anyone know why?

Thanks in advance.

Use Camera.main (capitalize Camera, lower main) [corrected]