# Spawning problem

**URL:** <https://phaser.discourse.group/t/spawning-problem/2999>\
**Category:** Phaser 3\
**Created:** [July 4, 2019, 11:01am UTC](https://phaser.discourse.group/t/spawning-problem/2999 "2019-07-04T11:01:15Z")\
**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 4, 2019, 11:01am UTC](https://phaser.discourse.group/t/spawning-problem/2999/1 "2019-07-04T11:01:15Z")

</div>

Hi, I have this class constructor and I’m trying to spawn enemies onto my canvas however they are not showing up? There is not error either… Help would be greatly appreciated

class Enemy extends Phaser.Physics.Arcade.Sprite {  
constructor(scene, game, tank, player, x, y, bullets){  
super(scene);

```
                var x = Phaser.Math.RND.between(0, 800);
                var y = Phaser.Math.RND.between(0, 600);

                this.game = game;
                //scene.physics.add.existing(this)
                                   
                this.health = 3;
                this.player = player;
                this.bullets = bullets;
                this.fireRate = 1000;
                this.nextFire = 0;
                this.alive = true;

                this.turret = new Phaser.Physics.Arcade.Sprite(scene, 100, 100, 'enemy', 'tank1');
                this.tank = new Phaser.Physics.Arcade.Sprite(scene, 100, 100, 'enemy', 'turret');
                this.turret.setOrigin(0.3, 0.5);
                this.tank.setOrigin(0.5, 0.5);
                /*this.tank.body.immovable = false;
                this.tank.body.collideWorldBounds = true;
                this.tank.body.bounce.setTo(1, 1);*/
            }
            
            update(time, delta) {

                this.turret.x = this.tank.x;
                this.turret.y = this.tank.y;

            }
        }

        myguy = this.physics.add.group({

            classType: Enemy,
            maxSize: 20,
            runChildUpdate: true
        });

        myguyy = myguy.get().setActive(true).setVisible(true);
```

---

<div class="post-metadata">

**Author:** ![ldd](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@ldd](https://phaser.discourse.group/u/ldd)\
**Post date:** [July 4, 2019, 4:12pm UTC](https://phaser.discourse.group/t/spawning-problem/2999/2 "2019-07-04T16:12:15Z")

</div>

you have a group but have not created nothing in it. try  
`myguy.create()` [link](https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Group.html#create__anchor)
