"Resetting" a scene

Hello,

A bit of a noob question here: I’m making a fairly simple game consisting of many levels. The problem I have is resetting the level (aka the scene because I have one scene for each level) if the user wants to play the level over again.

I was looking through the storyboard api (http://docs.coronalabs.com/api/library/storyboard/), but I can’t seem to find what I need. I thought I needed storyboard.purgeScene( “current scene”) and then transition to that same scene to recreate it, but that gives me an error (bad argument #-2 to ‘insert’).  If I simply transition to the same scene without purging it the thing becomes a huge mess as two scenes become stacked on top of each other and the code starts tripping out.

What should I do ?

Any help would be greatly appreciated.

http://youtu.be/2IDzu6qWRCM

Ah exactly what I needed, thank you!

http://youtu.be/2IDzu6qWRCM

Ah exactly what I needed, thank you!