ok so I’ve made some adjustments to my code and I’ve gotten a little further as I am able to restart at least once but I still get the attempt to call method ‘applyForce’ (a nil value) error
local peng = {} local function activatePengs(peng,event) peng:applyForce(0, -45, peng.x, peng.y) end local function touchScreen(event) -- print("touch") if event.phase == "began" then peng.enterFrame = activatePengs Runtime:addEventListener("enterFrame", peng) end if event.phase == "ended" then Runtime:removeEventListener("enterFrame", peng) end end local function onCollision(event) if event.phase == "began" then print "collide" composer.gotoScene( "restart",{ time=800, effect="crossFade" } ) end end function scene:create( event ) local sceneGroup = self.view ... peng = display.newImage(sceneGroup, "peng.png", 80, 201) physics.addBody(peng, "dynamic", {density=.18, bounce=0.1, friction=.5, radius=55}) ... end