AddMovementInput Not working on Server. Why?

I am trying to make a Pawn that can be controlled by a player and have it’s movement replicated.

I don’t want to use Character pawn so please don’t suggest that.

I understand that Default Pawns don’t automatically handle replication like the character does and you need to handle the movement on the Server with RPCs.

In my DefaultPawn class I have overriden the MoveForward function and added a Server/Client check to the move forward function. When the Client calls MoveForward it is correctly recognizing that it is the client and calling the RPC on the server. The server then runs the MoveForward function, I have debugged the function and it is definitely being called on the Server with the correct values.

The weird thing is nothing happens on the Server or Client when the MoveForward function called on the Server even though it is definitely being called.

Why does AddMovementInput() work when called on the Client but do absolutely nothing when called on the Server?
MoveForaward function and it’s RPCs:

void ADefPawnTest::MoveForward(float Val)
{
	if (GetNetMode() == ENetMode::NM_DedicatedServer)
	{
		FVector Dir = GetActorForwardVector();
		AddMovementInput(Dir, Val * 200);
	}
	else if(GetNetMode() == ENetMode::NM_ListenServer)
	{
		FVector Dir = GetActorForwardVector();
		AddMovementInput(Dir, Val * 200);
	}
	else if (GetNetMode() == ENetMode::NM_Client)
	{
		ServerMoveForward(Val);
	}
}

bool ADefPawnTest::ServerMoveForward_Validate(float Val)
{
	return true;
}

void ADefPawnTest::ServerMoveForward_Implementation(float Val)
{
	MoveForward(Val);
}

Hello! I think that the thing is like that: Controllers exist only on clients, so everything connected with them are supposed to be on Clients. As you can see AddMovementInput() is just adding some vector to ControlInputVector, which is not replicating.

Controllers exist on client and server. You are thinking of the client’s controller not existing on other clients. If the controller did not exist on the server the server would not be debugging the function when it is called.