im trying to use the code below to play a sound when the player score is 10 but the game wont load in.
function preload(){
this.load.audio('finish', 'audio/complete.mp3');
};
function create(){
if (this.player.score == 10){
this.play.sound('finish');
};
};