How do I make my character only sprint in one direction?

How would I make my character only sprint forward. I know in Fortnite, you can’t sprint with left, right, and backwards. I want to make it like that. I know how to change the speed of my character to sprinting, but not only for forward. Thanks!

I like to control inputs with a bool. This way any time I want I can turn off execution for any input. This has a lot of uses, like for stuns, menus, etc… When moving left or right simply disable the input bool for sprinting. There’s probably some testing you need to do to find scenarios this wont work with and fix them. This isn’t also to say the only way to do it, like most things in the engine it can be done a million ways, just go with what works and makes sense for your project.

I tried that but it doesn’t work. Can you send me an example blueprint?

Blueprint doesn’t seem to be working. Can you send an example?