# this.hitTest(\_root.player.shield)

**URL:** <https://forum.kirupa.com/t/this-hittest--root-player-shield/315503>\
**Category:** Uncategorized\
**Created:** [October 27, 2010, 8:48pm UTC](https://forum.kirupa.com/t/this-hittest--root-player-shield/315503 "2010-10-27T20:48:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tracenewbie](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@tracenewbie](https://forum.kirupa.com/u/tracenewbie)\
**Post date:** [October 27, 2010, 8:48pm UTC](https://forum.kirupa.com/t/this-hittest--root-player-shield/315503/1 "2010-10-27T20:48:48Z")

</div>

Hello everyone, I am new here, pleased to meet you!

So this is what I have:

- enemy ball movieclip, no instance name. Referred to as “ **this** ” in the code.
- one MovieClip with instance name **player**
- inside the MovieClip with instance name \*\*player \*\*is another MC with instance name **shield** on frame 2.

When I press SPACE frame 2 is played, i.e. the shield is showing.

The thing is that no collission is detected in the code below.  
However, if I remove “.shield” from “\_root.player.shield”, there is a collission but the \*\*shield \*\*is acting as a part of \_root. **player**.  
This results in widening my hitbox and loosing HP easier, not what a shield is for huh?

So, whats wrong with the code?

```auto
onClipEvent (enterFrame) {

if(this.hitTest(_root.player.shield))

{_root.score = 1000000000;}}

```
