#client doesnt get there own cam or movement when (!islocal) in update

26 messages · Page 1 of 1 (latest)

red zealot
#

playermovement script

#

player look script

grizzled remnant
#
if (!isLocalPlayer)
{
return;
}
#

@red zealot

#

You have:

if (!isLocalPlayer)
isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);
#

Which means if not local player, dont run the line below it (which is Physics.CheckSphere )

#

Without these: { }
Code runs just the first line below it.

red zealot
#

thank you so much

grizzled remnant
#

You also have no check in Fixed Update

#
 void FixedUpdate()
    {

if (!isLocalPlayer)
{
return;
}

        MovePlayer();
    }
red zealot
#

ok thank you ❤️

grizzled remnant
#

The. PlayerLook.cs. is missing the same stuff 🙂

#

Either return in the /Fixed/Late Updates

or have the scripts disabled.
and enable them if local player, from your networked script. Good luck 🙏

red zealot
#

thanks ❤️

#

that stiill didnt work

grizzled remnant
#

It will be one step closer

#

Your NetworkTransform on player prefab root

#

It has a sync direction dropdown box.
Set it to client-server, not server-client.

#

By default its server-client. (i really wish it wasnt lol)

#

@red zealot ^

red zealot
#

ok ill give it ago

#

didnt work

red zealot
#

it was working before i added a takedamage func then it stopped working so ir emoved it now i have ethis

red zealot
#

i dont know why it stopped working