How to get value of component from Main Camera?

Really, just don’t write code like this. It’s so unnecessary most of the time.

More information: Regarding GameObject.Find · UnityTipsRedux

More information: Why cant i find the other objects?

In general, DO NOT use Find-like or GetComponent/AddComponent-like methods unless there truly is no other way, eg, dynamic runtime discovery of arbitrary objects. These mechanisms are for extremely-advanced use ONLY.
If something is built into your scene or prefab, make a script and drag the reference(s) in. That will let you experience the highest rate of The Unity Way™ success of accessing things in your game.

Remember the first rule of GameObject.Find():

Do not use GameObject.Find();