Hello guys, I’m using a timer.performwithdelay to display some images but when I leave the main game scene I can’t avoid it continuing displaying those. I need to stop the timer.performwithdelay and clear the images from the screen. I’ve tried with timer.pause(myfunction(myparams)) but it doesn’t work.
That’s the code:
local powerup\_start1=timer.performWithDelay( 700, function() powerup(player2, 2, blueSegmentTransition, blueX, blueY, lenblueX); end) local powerup\_start2=timer.performWithDelay( 700, function() powerup(player1, 1, redSegmentTransition, redX, redY, lenredX); end)
How do I stop these? And how do I clear the images?