# Hittest problem

**URL:** <https://forum.kirupa.com/t/hittest-problem/187340>\
**Category:** Uncategorized\
**Created:** [April 28, 2006, 12:59pm UTC](https://forum.kirupa.com/t/hittest-problem/187340 "2006-04-28T12:59:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![keithjarrett](https://avatars.discourse-cdn.com/v4/letter/k/bbe5ce/32.png) [@keithjarrett](https://forum.kirupa.com/u/keithjarrett)\
**Post date:** [April 28, 2006, 12:59pm UTC](https://forum.kirupa.com/t/hittest-problem/187340/1 "2006-04-28T12:59:16Z")

</div>

Hi, I’m doing a platform game, and I can’t seem to code so that when the char hits the enemy, it goes to the previous scene.

What’s wrong with this code?

I have put this code in the enemy movieclip;

onClipEvent (enterFrame) {  
if (this.hitTest(char)) {  
prevScene();  
}  
}

Thanks,
