# Help with character facing direction he was just walking in

**URL:** <https://forum.kirupa.com/t/help-with-character-facing-direction-he-was-just-walking-in/229436>\
**Category:** Uncategorized\
**Created:** [June 17, 2007, 5:32am UTC](https://forum.kirupa.com/t/help-with-character-facing-direction-he-was-just-walking-in/229436 "2007-06-17T05:32:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icezizim](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Icezizim](https://forum.kirupa.com/u/Icezizim)\
**Post date:** [June 17, 2007, 5:32am UTC](https://forum.kirupa.com/t/help-with-character-facing-direction-he-was-just-walking-in/229436/1 "2007-06-17T05:32:19Z")

</div>

obliviously right now, after the mc walks he will just go to facing down. how can i make it where he faces the direction he was just looking? and i have a frame in the mc for each direction, like “herostopright”, “herostopleft”, etc. thanks!

```php

onClipEvent (load) {
    walkSpeed = 5;
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.UP)) {
        _y-= walkSpeed;
        this.gotoAndStop("heroup");
    }
    else if(Key.isDown(Key.DOWN)) {
        _y+=walkSpeed;
        this.gotoAndStop("herodown");
    }
    else if(Key.isDown(Key.RIGHT)) {
        _x+=walkSpeed;
        this.gotoAndStop("heroright");
    }
    else if(Key.isDown(Key.LEFT)) {
        _x-=walkSpeed;
        this.gotoAndStop("heroleft");
    }
    else {
        this.gotoAndStop("herostopdown")
    }

}

```
