So I haven’t used Photon before, but I’m following a tutorial and the documentation. (The tutorial is for making players connect, etc.) I am getting a NullReferenceException: Object reference not set to an instance of an object error.
I’ll post hastebins if you can help me out. The lines will be marked with where the error is taking place. I’ve been trying to figure this out but i can’t.
https://hastebin.com/icipevodip.cs // player movement script
https://hastebin.com/vewemomuhu.cs // weapon switching script
https://hastebin.com/fodikiduzi.cs // pistol script
The reason I did hastebin was because some of these scripts are long. I feel like this error is happening because it’s always thinking that the player isn’t my player and is just returning false. If you guys need more help, I am using Dani’s player movement script that he made. This has two scripts, one for the head and then the actual movement. The rest is my code. I’m just really confused and im trying to fix it.