isLocalPlayer always false for non-host players.

My start function looks like this:
3077456--231584--upload_2017-5-20_13-11-19.png
The rest of the script allows the player to shoot.

I built the game, went back to Unity and hit play to host a game and the log gave what I wanted:

But once I try to join with the built game, I get a false response:


The bottom one being the isLocalPlayer value for the non-host player, so now one player can’t shoot. I tried it with 3 players and it only is true for the host. I even quit the hosted game and joined again to see if the value might change, but it does not.

Here is the Network settings for the Player GameObject, which the script is attached to:
3077456--231587--upload_2017-5-20_13-17-16.png

This is the bullet Network settings, if it helps, which the script is NOT attached to:
3077456--231589--upload_2017-5-20_13-18-57.png

I have been searching through google to find an answer and hours of doing so led me to nothing. If anyone knows a solution to my problem please let me know. Thank you!

I’m having the same exact problem! The Host and Client both spawn player prefabs, i can move both players around with the movement correctly showing up on all screens, but isLocalPlayer always seems to be false on the joining client.
Any luck on your side?

Well, if the host runs the client code then it will return false on their instance.

So, I hit this issue today and through debug statements I figured out that OnStartLocalPlayer was happening AFTER OnEnable on the client and BEFORE OnEnable on the server.

Once I figured that out, fixing was just a matter of making sure stuff was done in the correct order and such.