var platforms;
function create ()
{
this.add.image(400, 300, 'sky');
platforms = this.physics.add.staticGroup();
platforms.create(400, 568, 'ground').setScale(2).refreshBody();
platforms.create(600, 400, 'ground');
platforms.create(50, 250, 'ground');
platforms.create(750, 220, 'ground');
}
part1.html:44 Uncaught TypeError: Cannot read properties of undefined (reading ‘add’)
at Scene.create (part1.html:44:34)
at SceneManager.create (phaser.js:46843:26)
at SceneManager.loadComplete (phaser.js:46737:14)
at LoaderPlugin.emit (phaser.js:2011:35)
at LoaderPlugin.loadComplete (phaser.js:89330:14)
at LoaderPlugin.fileProcessComplete (phaser.js:89289:18)
at SpriteSheetFile.onProcessComplete (phaser.js:4068:21)
at data.onload (phaser.js:7389:19)
Can u help ?