I have a an image which is called “box”, that image has a “tap” event listener, when you tap it this function is ran:
function destroyBox() playPop = audio.play(popSound) score = score + 1 scoreText.text = score boxSpawned = 0 box:removeSelf() spawnBox() end
How can I make a check so that every tenth time the box is tapped you get 1 coin?
Thanks.