passing pointers in rpc

If you want prediction to work properly you need to extend the CharacterMovementComponent rather than simply changing the walk speed on the fly.
For client authoritative movement or simple movement it might work most of the time just changing the walk speed but when you get some complex interactions it starts to fall apart and server corrections start to happen often.

The Character Movement Component is complicated to look at but there is a lot of helpful information out there that makes it a lot easier to implement your own movement modes like sprinting.