Unity tells me that i have a problem in my script but i don't get what i need to change on it to make it work, this is the problem: NullReferenceException: Object reference not set to an instance of an object PickUpCamera.Start () (at Assets/PickUpCamera.js:14) This is the Script: Code (csharp): var DigitalCameraHide : DigitalCameraScript; // var DigitalCameraObject: GameObject; var PickupSound: AudioClip; private var inTrigger = false; // private var hasDigitalCameraScript = false; function Start () { DigitalCameraHide = GameObject.Find("Player").GetComponent(DigitalCameraScript); DigitalCameraHide.enabled = false; }
Are you sure you have a game object named "Player" that has the DigitalCameraScript on it? Because it's not finding it.