# How do i use hit test to go to next scene?

**URL:** <https://forum.kirupa.com/t/how-do-i-use-hit-test-to-go-to-next-scene/108415>\
**Category:** Uncategorized\
**Created:** [April 25, 2004, 2:40am UTC](https://forum.kirupa.com/t/how-do-i-use-hit-test-to-go-to-next-scene/108415 "2004-04-25T02:40:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smack\_boom](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@smack\_boom](https://forum.kirupa.com/u/smack_boom)\
**Post date:** [April 25, 2004, 2:40am UTC](https://forum.kirupa.com/t/how-do-i-use-hit-test-to-go-to-next-scene/108415/1 "2004-04-25T02:40:42Z")

</div>

[font=Courier New]At the start of my game you have to fight monsters, how do i make him attack the baddies?[/font]  
[font=Courier New]and second how to i walk into a cave and go to a next scene or frame? my current script is[/font]

```
          if (_root.door.hitTest(_root.player)) {
             gotoAndPlay("cave", 1);

```

any suggestions?
