# Making a mc follow another

**URL:** <https://forum.kirupa.com/t/making-a-mc-follow-another/247647>\
**Category:** programming\
**Created:** [December 27, 2007, 7:54pm UTC](https://forum.kirupa.com/t/making-a-mc-follow-another/247647 "2007-12-27T19:54:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonthelion](https://avatars.discourse-cdn.com/v4/letter/l/58956e/32.png) [@leonthelion](https://forum.kirupa.com/u/leonthelion)\
**Post date:** [December 27, 2007, 7:54pm UTC](https://forum.kirupa.com/t/making-a-mc-follow-another/247647/1 "2007-12-27T19:54:54Z")

</div>

How can I make an mc move twords another mc’s x position? That way it kind of follows it. I tried:

```php
onClipEvent(enterFrame){
if(this._x<=circle._x){this._x+=5}}

```

Which didn’t work. I can’t think of anything else though.
