How to change the characters movement by 90 degress by a press of a button?

Hi if you have the characters constantly moving forward (like an endless runner), how do you change to movement by 90 degrees by pressing a button?

This would depend on your controller/pawn setup.

If your pawn is set to orient to movement direction then just change your velocity input 90 degrees on button press,

If your pawn ignores movement direction then on press you still need to change velocity input while also perhaps rotating the pawn to face the new direction.

There really are a number of ways this could work; which part of this are you having trouble with?

Have a look at this endless runner tutorial