# Why is my turret not shooting the bullets at all?

**URL:** <https://phaser.discourse.group/t/why-is-my-turret-not-shooting-the-bullets-at-all/3146>\
**Category:** Phaser 3\
**Created:** [July 18, 2019, 12:20pm UTC](https://phaser.discourse.group/t/why-is-my-turret-not-shooting-the-bullets-at-all/3146 "2019-07-18T12:20:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faizan\_Ali](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/faizan_ali/32/964_2.png) [@Faizan\_Ali](https://phaser.discourse.group/u/Faizan_Ali)\
**Post date:** [July 18, 2019, 12:20pm UTC](https://phaser.discourse.group/t/why-is-my-turret-not-shooting-the-bullets-at-all/3146/1 "2019-07-18T12:20:10Z")

</div>

Hi, I have an enemy tank and turret attached to it. I also have a bullet class and I am using it to shoot bullets from the turret however it is not shooting? My bullet class is working because my player object is inheriting the class so the bullet class is not the issue.

If I change my sprite “this.turret” to “this.enemy”, in my enemyFire function call out, it shoots from my enemy tank instead of the turret.

//sprite callouts - in my Enemy class constructor  
this.enemy = this.scene.physics.add.sprite(x, y, ‘player2’, ‘tank1’);  
this.turret = this.scene.physics.add.sprite(x, y, ‘player2’, ‘turret’);

//enemyFire function  
function enemyFire (enemy, player, time, gameObject)  
{  
if(enemy.active === false)  
{  
return;  
}

```
        if((time - enemy.lastFired) > 1700)
        {
            enemy.lastFired = time;

            var bullez = enemyBullets.get().setActive(true).setVisible(true);

            if (bullez)
            {
                bullez.fire(enemy, player);
                
                
            }
            
        }
        
    }
    enemyFire(this.turret, player, time, this);

```

//collision callback  
this.scene.physics.world.collide(player, enemyBullets, playerHitCallback, null, this);

---

<div class="post-metadata">

**Author:** ![Faizan\_Ali](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/faizan_ali/32/964_2.png) [@Faizan\_Ali](https://phaser.discourse.group/u/Faizan_Ali)\
**Post date:** [July 18, 2019, 12:28pm UTC](https://phaser.discourse.group/t/why-is-my-turret-not-shooting-the-bullets-at-all/3146/2 "2019-07-18T12:28:52Z")

</div>

😔
