Collision dubbels up overtime you restart the game

I have this onCollision function but every time the game starts over the collision double up

local function onCollision(event) if event.phase == "began" and gameIsActive == true then local obj1 = event.object1; local obj2 = event.object2; if obj1.name == "jetplayer" and obj2.name == "BCloud1" then MinLife() elseif obj1.name == "jetplayer" and obj2.name == "BCloud2" then pontsMin10() elseif obj1.name == "jetplayer" and obj2.name == "BCloud3" then pontsMin20() elseif obj1.name == "jetplayer" and obj2.name == "GCloud1" then pontsplus50() elseif obj1.name == "jetplayer" and obj2.name == "bla" then score = score - 20 end end end Runtime:addEventListener( "collision", onCollision ) function scene:exitScene( event ) Runtime:removeEventListener( "collision", onCollision )  

is there any reason for this to happen ?

I would say your removeEventListener isn’t getting hit.  Try putting at print(“Done with remove collision”) or something after it and make sure that shows up in the console.  

The other thing it could be is whatever logic you are using your addEventListener is being called twice.  I’m assuming you really have that call in your createScene or enterScene event?

I would say your removeEventListener isn’t getting hit.  Try putting at print(“Done with remove collision”) or something after it and make sure that shows up in the console.  

The other thing it could be is whatever logic you are using your addEventListener is being called twice.  I’m assuming you really have that call in your createScene or enterScene event?