Why does my audio clip only play once and stop playing after that?

Why does my audio clip only play once and stop playing after that?
0.0 0

#1

So my project is this: https://codepen.io/truecam/pen/Wdwjjd?editors=1111

In the game whenever I first click on the correct square it plays the sound correctly. However after that first time the sound does not play again. However as new squares get added onto the array they will all be played once also then stop working in the next iterations. I don’t understand what I am doing wrong here, and my error and fail audio are working just fine.

Any help would be appreciated, thank you.


#2

how do you want it to be??
as i see it , the buzzing sound plays after you have successfully tapped on the sequence and on wrong click it gives the beep sound.


#3

When pressing a certain square it plays a different sound. The square is only playing once, then every other sequence the square sound won’t play.


#4

Okay, I am an idiot. I put the sound playing inside the else if that checked if the square was the last one. Lol.