Help with hitTest

So I’m working on a game for a class and since it is in actionscript, a lot of the work is independent. So my game basically consists of a bike character riding around and avoiding obstacles. My script looks like this:

onClipEvent (enterFrame) {
if (_root.bike, hitTest (_root.obstacle)){
_visible = false;
}
}

This script works, but when I replace the visible statement to gotoAndPlay it doesn’t work.

onClipEvent (enterFrame) {
if (_root.bike, hitTest (_root.obstacle)){
gotoAndPlay (“gameover” , 1);
}
}

I really don’t know what to do and I hope you guys can help.