'Unity NetCode IsLocalPlayer false client dosent have control (Host - Client Control Problem)

I am using netcode for multiplayer solution but there is a problem that I haven't been able to solve for a long time. In the past, my problem was that both client and host control the same Player. I put IsLocalPlayer control in the script but this time I can control the host without any problems, but I cannot control the client. and Client Player prefab networkobject booleans always false.

Client Prefab network gameobject boolean values

Host Prefab network gameobject boolean values



Solution 1:[1]

Are you using the Network Transform component on the player prefab? If so, try switching to Client Network Transform component. I had the same issue and this solved mine.

Solution 2:[2]

it happened because the client isn't allowed to move an object with network transform, because of it you need to remove the NetworkTransform and instead move the player with Rpc's you can write an scrips your own but in the Netcode samples there's Client Network Transform script use it and it will solve the problem

https://answers.unity.com/questions/1868685/netcode-client-cant-move-his-playerunity-netcode-m.html - example

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ikshura Tachintha
Solution 2 Pash