I’m Watching brackeys multiplayer fps tutorials and i just finished watching ep 16 Bug Fixing and i have trouble. When i play as player 1 (The host) and shoots player 2 (The client) he dies at one shot and respawns then i can’t move player 2 but i can shoot him with player 1 and he dies after like 20 shots (like he should do) And i get this error. NullReferenceException; Object reference not set to an instance of an object. And the error comes from my player.cs script. Line 39, 92, 130 and 135. And in player.setup. Line 96, 53. Here is screenshots of my code and exact lines that causes the errors http://imgur.com/a/licOt I can’t see what as actually is wrong please help me, thanks!
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
352 People are following this question.
Error: -Has an extra field and can't be serialized
Unable to join player connection alternative multicast group.
Survival Shooter Error CS0120
My game script is fine but I'm still getting unexpected class error
NullReferenceException: Error from the GetStyle() - Method