Second player can't change max walk speed

I posted about this before but it has been waiting admin approval for a while now so I just thought I would post again.

I am new to networking and I thought I would just try and create a very basic script for sprinting. It works 100% on the server player but when the client tries to sprint, nothing happens. The movement speed remains constant.

This was my original script. Basically when the player presses shift, it sets running to true and then calls the Character Run function which sets the max walkspeed of the player. The problem with this is the client was printing the end result but the max walk speed wasn’t being changed. This changed however when I added authority switch. When this was added, nothing was printed from the client.

I then thought it might be an issue with the Max Walk Speed only being modified on the servers character so I tried to cast to CharacterMovementComponent to get the clients component but this did basically the same thing.

If anyone can help with this, it would be greatly appreciated. Thanks in advance.

Thankyou so much. I knew it would be something simple like this and believe it our not I almost had it in another script.

Second one it kind of correct but what u need to do it make a Client-to-Server call to tell the server that u want to run also, then on server u need to change the max walk speed also, then other client will replicated correctly.

25880-1.png

ServerSetRun is custom event and this one is config for Client-to-Server call.

25902-2.png