How do you get your character to look the way you are walking?

I am creating a 2D game and I would like to know a script which change the way my character is facing. Like when I am walking right he looks right and when I am walking left he looks left. Has anyone got any good scripts or ways to do this?

Thanks! :smiley:

You need to compare the direction that you’re moving in with the direction you’re facing. If they’re different, flip your sprite the other way.

Checkout this Guzaii’s script here.