Hey everyone/anyone that can help…
I am trying to add a restart game button that comes up when gameover is displayed in this game. Restart button comes up but when you press it it doesn’t restart the game it just gives you a screen with the background only. I don’t know what I am doing wrong… Can somebody please help me on this? I have been trying for a while now 
Code goes like this… debugger comes up with no clues to as what i am doing wrong
function gameOver()
local gameOverSound = audio.loadSound(“SoundGameOver.wav”)
audio.play(gameOverSound)
audio.fadeOut{channel = soundBackgroundChannel, time = 2000}
stopListeners()
local gameOverImage = display.newImageRect( game, “GameOver.png”, 425, 79 )
gameOverImage.x = HALF_WIDTH
gameOverImage.y = HALF_HEIGHT
local replayButton = ui.newButton{
default = “replayButton.png”,
over = “replayButton.png”,
onRelease = function(event)
removeSelf(); startGame() end
}
game:insert(replayButton)
replayButton.x = display.contentWidth / 2
replayButton.y = gameOverImage.y + gameOverImage.height / 2 + replayButton.height / 2
end
Thank you soooooo much just for taking the time to look at this and help…
Andrew [import]uid: 165071 topic_id: 32704 reply_id: 332704[/import]
After reading your reply I had another look and the answer was right in front of me (after soooo long lol)… Well i copied the startGame code from my main.lua into my replay section in my game.lua and added game:removeSelf()… Just fiddling with Soundbackground now as only plays twice then not at all after pressing replay… The sound effects play every time though?!? odd lol… Anyway Thanks again Peach, you are Awesome!!! [import]uid: 165071 topic_id: 32704 reply_id: 130093[/import]