How do I restrict my character's movement to one axis?

X, Y & Z are three axes in this right? Z is already out of the picture, between X & Y, I want to restrict the movement to one of them when you are pressing the input button for the sliding feature.

I will try that anim montage thing, let’s hope it works and sorry if im confusing things, i just started unreal 5 days ago :frowning:

also, if you could help me understand, how do i disable input?