UE4 Sprint Jitter

I have this function to handle sprinting:

void ADynamixCPPCharacter::StartSprint_Implementation()
{
sprinting = !sprinting;
if (sprinting) {
GetCharacterMovement()->MaxWalkSpeed = 3000;
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Sprint"));
}
else {
GetCharacterMovement()->MaxWalkSpeed = baseWalkSpeed;
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Stop Sprint"));
}
}

It is replicated to the server (Unreliably)
When I sprint in the game, and when connected to a server, it jitters. This issue only works in C++, and is nonexistant in blueprints.

What am I doing wrong?