# Hittest stop?

**URL:** <https://forum.kirupa.com/t/hittest-stop/112118>\
**Category:** Uncategorized\
**Created:** [June 3, 2004, 6:39pm UTC](https://forum.kirupa.com/t/hittest-stop/112118 "2004-06-03T18:39:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yhack](https://avatars.discourse-cdn.com/v4/letter/y/3da27b/32.png) [@yhack](https://forum.kirupa.com/u/yhack)\
**Post date:** [June 3, 2004, 6:39pm UTC](https://forum.kirupa.com/t/hittest-stop/112118/1 "2004-06-03T18:39:13Z")

</div>

```auto
 onClipEvent (enterFrame) {
 if (Key.isDown(Key.LEFT)) {
  this._x -= 5;
 if (_root.alien.hitTest(_root.barrier)) {
  this._x += 5;
} 

```

the alien moves about then whin it touches a barrier it should stop but why dousnt my code work?
