❔ NullReferenceException Object reference not set to an instance of an object Billboard.Update
Hello, my name is Zorphix and I'm not so smart at C#. And I'm currently trying to add a billboard script to a unity game
inspired by Baldi's Basics In Education and Learning! I'm getting this error and I don't understand what it means. I don't know what and where to reference this object.
![](https://utfs.io/f/92677368-60c5-488e-a84e-57e539b27db8-1nq2cb.png)
![](https://utfs.io/f/f8d7f0c7-94b4-495b-a0ac-1958efaaf571-1nq2cb.png)
18 Replies
The 2nd picture is a sprite renderer and I want it to follow the camera.
Whoops, forgot to send the code.
![](https://utfs.io/f/4ccfb0c5-5cc5-4269-83c0-1026b9379287-1nq2cb.png)
means ur variable has no reference to an object
Either Camera or main or transform is null (idk unity)
hmm camera should be referenced there by default
main is a static property
did you add the camera to the scene?
Yep
can u show?
![](https://utfs.io/f/5466dcde-3493-4ddc-8604-649353cd5d59-1nq2cb.png)
click on it
and show me its inspector window
![](https://utfs.io/f/c907c6d3-6592-4722-95f4-19dd8f8a7993-1nq2cb.png)
Yup
tag has to be
MainCamera
its UntaggedAdd tag?
u have non atm?
wait no
Sorry there is a MainCamera tag
it should be listed when u click on the combobox
yeah
select it, and ur error should disappear
mk
I'll test it.
Yep!
Thank you very much!
np
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.