Download

How to acces CharacterMovementComponent on AMainCharacter

My goal is to make a run function but i just cannot seem to acces the “MaxWalkSpeed” variable in order to modify it.
I have tried to get acces through the GetComponent Function but it does nothing.

Run function:

full CPP page: