How to change movement speed of pawn C++

Hey eveyone! I am pretty new to C++ and UE4 and I am trying to make a simple breakout game. Right now I have the paddle moving left and right but I am trying to figure out how to expose a variable to reduce the speed of the paddle.

Here is my code:

#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "Paddle.generated.h"

class BREAKOUT_API APaddle : public APawn

	// Sets default values for this pawn's properties

	UStaticMeshComponent* PaddleMesh;

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

	void MoveRight(float Value);



// Fill out your copyright notice in the Description page of Project Settings.

#include "Paddle.h"
#include "Components/InputComponent.h"
#include "GameFramework/FloatingPawnMovement.h"

// Sets default values
	// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;


	PaddleMesh = CreateDefaultSubobject<UStaticMeshComponent>("PaddleMesh");

// Called when the game starts or when spawned
void APaddle::BeginPlay()

// Called every frame
void APaddle::Tick(float DeltaTime)


// Called to bind functionality to input
void APaddle::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)

	//How to setup new axis mapping
	PlayerInputComponent->BindAxis("Move", this, &APaddle::MoveRight);


void APaddle::MoveRight(float Value)
	AddMovementInput(GetActorForwardVector(), Value);

When you create the UFloatingMovementComponent, get a reference to it and use it to set its MaxSpeed property.

UFloatingPawnMovement *m_movementComponent;
m_movementComponent = CreateDefaultSubobject<UFloatingPawnMovement>("PaddleMovement");
m_movementComponent->MaxSpeed = 100.0f;

Another method which might be more simple to a beginner is to create a float Speed variable in the header.

UPROPERTY(EditAnywhere, BlueprintReadOnly)
float CurrentSpeed;

Maybe set this to 1 in the constructor or in the blueprint details panel.

Then in your ‘MoveRight’ function, multiply the value by CurrentSpeed. This means that when you change current speed, it will increase/decrease the speed the paddle will move.

Perfect guys! Thank you!