# How to change shooting directions?

**URL:** <https://forum.kirupa.com/t/how-to-change-shooting-directions/101485>\
**Category:** Uncategorized\
**Created:** [February 10, 2004, 12:20pm UTC](https://forum.kirupa.com/t/how-to-change-shooting-directions/101485 "2004-02-10T12:20:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fargate](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@Fargate](https://forum.kirupa.com/u/Fargate)\
**Post date:** [February 10, 2004, 12:20pm UTC](https://forum.kirupa.com/t/how-to-change-shooting-directions/101485/1 "2004-02-10T12:20:46Z")

</div>

I have the following player control script

[AS]  
onClipEvent (enterFrame) {  
if (Key.isDown(Key.RIGHT)) {  
this.\_x += 5;  
this.play();  
this.\_xscale = 100  
} else if (Key.isDown(Key.LEFT)) {  
this.\_x -= 5;  
this.play();  
this.\_xscale = -100  
}  
}  
[/AS]

My Guy normally shoots to the right, so the problem is when he turns to the left it looks like he’s shooting out of his back. How can I make it so that when he turns to the left he shoots in that direction as well.

I already tried the below altered shooting script…no success

[AS]  
onClipEvent (load) {  
if(\_root.mario.\_xscale =100) {   
shellMoveSpeed = 10;  
this.\_x = \_root.mario.\_x+10;  
this.\_y = \_root.mario.\_y;  
} else if (\_root.mario.\_xscale = -100) {   
shellMoveSpeed = - 10;  
this.\_x = \_root.mario.\_x-10;  
this.\_y = \_root.mario.\_y;  
}  
}  
[/AS]

Dunno…any ideas on how to fix this???Thanks in advance :).
