Third Person Forward Movement not working?

Through using some C++ movement tutorials on YouTube, everything works except for the MoveForward function.

Ive made a ladder mechanic that because i dont know how to implement through code, had to do through the Player Character Blueprint but since then, I cant get the player to move forward through code.

Any help?

I have this forward method:

void AAdventureCharacter::MoveForward(float Value)
{
	if((Controller != nullptr) && (Value != 0.0f))
	{
		//find out which way is forward
		const FRotator Rotation = Controller->GetControlRotation();
		const FRotator YawRotation(0,Rotation.Yaw,0);

		const FVector Direction{FRotationMatrix{YawRotation}.GetUnitAxis(EAxis::X)};

		AddMovementInput(Direction, Value);
	}
}

would that work?
Please paste code, no screenshots.

Best regards, Peter

Another alternative is:

const FRotator MovementRotation(0.0f, Controller->GetControlRotation().Yaw, 0.0f);
const FVector MovementDirection = MovementRotation.RotateVector(FVector::ForwardVector);

This is useful if you use Enhanced Input

		const FVector2D Value = InputActionValue.Get<FVector2D>();
		const FRotator MovementRotation(0.0f, Controller->GetControlRotation().Yaw, 0.0f);
		
		if (Value.X != 0.0f)
		{
			const FVector MovementDirection = MovementRotation.RotateVector(FVector::RightVector);
			Pawn->AddMovementInput(MovementDirection, Value.X);
		}

		if (Value.Y != 0.0f)
		{
			const FVector MovementDirection = MovementRotation.RotateVector(FVector::ForwardVector);
			Pawn->AddMovementInput(MovementDirection, Value.Y);
		}