same attempt to index upvalue error

hi guys,

I am creating a very basic game and instead of using the storyboard I am trying to reset the game once a collision is detected.

see the onCollision section below:

function onCollision(event)

local gameOver = audio.loadSound ( “blast.wav” )
audio.play(gameOver)
timer.performWithDelay ( 2000, createPlayScreen )

happy: removeSelf()
angry: removeSelf()
angry2: removeSelf()
angry3: removeSelf()
angry4: removeSelf()
angry5: removeSelf()
happy = nil
angry = nil
angry2 = nil
angry3 = nil
angry4 = nil
angry5 = nil

end

Runtime:addEventListener(“collision”, onCollision)
end

Basically, my game works fine the first time, but when the collision occurs, the createPlayScreen function runs successfully and I can get to start the game and everything, but next time when the collision happens I get the a nil value error.

please help.