How to destroy scene and its objects completely

After my jet collides with the plane this function is called.

This function redirects to the menu scene.

When I select the PLAY button I get a blank screen

world1.lua ------------------------------------------------------------------------- function gameOver() flyBtn.isVisible = false; pauseBtn.isVisible = false; jet.isVisible = false; Runtime:removeEventListener("enterFrame", city1) Runtime:removeEventListener("enterFrame", city2) Runtime:removeEventListener("enterFrame", city3) Runtime:removeEventListener("enterFrame", city4) Runtime:removeEventListener("enterFrame", plane1); Runtime:removeEventListener("enterFrame", coin100) Runtime:removeEventListener("enterFrame", coin200) Runtime:removeEventListener("enterFrame", coin500) composer.gotoScene("menu") end

function scene:didExit( event ) local screenGroup = self.view composer.removeScene("world1") end 

Basically I just want to restart my level from scratch

Not the answer you need, probably, but it’s always best to group all your “creation” methods together somehow, so when you need to write your “kill” methods, you can easily see exactly what needs to be removed. I don’t use composer so I’m not in a place to advise you in this specific case though.

Thnx … but removeScene automatically removes the scene and scene objects ,

Not the answer you need, probably, but it’s always best to group all your “creation” methods together somehow, so when you need to write your “kill” methods, you can easily see exactly what needs to be removed. I don’t use composer so I’m not in a place to advise you in this specific case though.

Thnx … but removeScene automatically removes the scene and scene objects ,