Make sure that the camera you're using with the player has the tag called "maincamera" on it or the other easier way to fix the issue would be to remove the line in the void start assigned the camera to amera.main and making the camera variable in your script public and then in the inspector simply dragging the camera there hopefully this helped with your problem :)
@@ahggw you don't have to apologize if you ever have any questions regarding unity you can add me on discord if you like I'm always down to help any developer in any ways possible.
Thank you for the lesson
Please help me how to solve :'Camera' does not contain a definition for 'main'
Make sure that the camera you're using with the player has the tag called "maincamera" on it or the other easier way to fix the issue would be to remove the line in the void start assigned the camera to amera.main and making the camera variable in your script public and then in the inspector simply dragging the camera there hopefully this helped with your problem :)
@@lurple_ Thank you very much, it helped a lot (I just started to get involved in unity, I apologize if this was a bonal mistake)
@@ahggw you don't have to apologize if you ever have any questions regarding unity you can add me on discord if you like I'm always down to help any developer in any ways possible.