- Home /
Lerpz wont move
I am a 3-D artist new to gaming engines and I am having trouble with this Lerpz game tutorial. I am on page 19 where I need to apply the ThirdPersonPlayerAnimation to the Lerpz game object and I am getting this error:
NullReferenceException: Object reference not set to an instance of an object SpringFollowCamera.LateUpdate () (at Assets/Scripts/Camera/SpringFollowCamera.js:44)
I don't understand whats going on. Can someone Please help me out?
Answer by skovacs1 · Nov 17, 2010 at 06:56 PM
Here's what the error means:
On one of your objects, likely the camera, there is an instance of the script Assets/Scripts/Camera/SpringFollowCamera.js attached. At line 44 of this script, there is an object that it is trying to reference that does not exist.
I looked at the script in question and the object that it is trying to reference is controller
, the ThirdPersonController
that should be attached to the target (which it gets in Awake()).
There are several sources for the problem and possible solutions:
- You could remove the SpringFollowCamera script and then it won't give you that error.
- If the target on the script is not set, then set the target to be an object with a ThirdPersonContoller attached.
- If the target specified does not have a ThirdPersonController, add a ThirdPersonContoller to the target.
- Were you making a change in Play mode? This is generally a bad idea if you don't know what you are doing. Stop, make your changes and then click Play.
- If none of the above apply, then the error may be a remnant from some past state at which you clicked Play when your scene was not properly setup. Clear the error and try again.
Your answer
![](https://koobas.hobune.stream/wayback/20220613083444im_/https://answers.unity.com/themes/thub/images/avi.jpg)