NullReferenceException: Object reference not set to an instance of an object

Original post has been removed.

Try changing player too public then give it player in inspector. That error mean’s you haven’t assigned something which looks too be player. Also try if(player! = null){

}
before you get the player 1 of these should work I think.