#Why can’t clients move?

1 messages · Page 1 of 1 (latest)

lean rain
#

Problem:

Host movement works (clients see host moving).

Clients cannot move, but their logs (Debug.Log) confirm:

Update() runs ("I am owner" logs appear).

Move(), JumpAndGravity(), and StarterAssetsInputs logs appear.

Only this error in the console " NullReferenceException: Object reference not set to an instance of an object
StarterAssets.ThirdPersonController.OnNetworkSpawn "

What I’ve Checked:

✅ IsOwner is true for clients (ownership confirmed).

✅ PlayerInput is enabled for clients.

✅ NetworkTransform is attached and set to Client Authority.

✅ CharacterController is enabled and moving locally (debug logs show position changes).

Question:
Why can’t clients move, even though all systems seem functional?

fading willow
lean rain
fading willow
#

It will overwrite what NetworkTransform tries to sync

lean rain
#

i still can't move

#

i am losing my mind 😭

fading willow
#

What line is that NullReferenceException?

fading willow
# lean rain

It can’t find a CinemachineBrain in the children and is going to halt that function from finishing

#

So none of the setup below that line will run

#

Not sure if it’s causing your issue but

lean rain
#

I removed it that line, the error is gone i still can't move xD

potent basin
#

Check for IsLocalPlayer instead of IsOwner
But why are you disabling the transport?

#

You'll need to disable the PlayerInput and Character Controller on the nonlocal players

lean rain
#

cause if i don't disable it, it tracks to the new player

potent basin
#

This is what I added to the ThridPersonController in OnNetworkSpawn()

cameraFollow = (CinemachineCamera)Camera.main.GetComponent<CinemachineBrain>().ActiveVirtualCamera;
_controller.enabled = IsLocalPlayer;
_input.enabled = IsLocalPlayer;
_playerInput.enabled = IsLocalPlayer;
if (IsLocalPlayer)
{
    cameraFollow.Follow = CinemachineCameraTarget.transform;
}
lean rain
#

i gave up, i am delete the entrie thing

potent basin
#

If the other player object's player input is not getting disabled, it will not work

lean rain
#

The client is still unable to move

potent basin
#

You'll need to make sure the Network Transform is set to Owner Authority

potent basin
lean rain
potent basin
lean rain
#

does me using relay has anyhting to do with this

#

i am geniunlly confused

potent basin
lean rain
#

i love you