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

sorry for replying late, thanks for the vid but i have already pretty much made that. i just want the character to be locked into one axis for the duration of the slide. is there no way to lock your player’s axis when you are triggering an event?