Need Help With Updating Score

Hello everyone, I’m new to Corona and this is probably a very newbish question, but I am having trouble incrementing my score counter whenever I click an object. The number does go up, however the previous number stays behind it and the score gets blurred. Any help would be greatly appreciated. 

--House Keeping display.setStatusBar( display.HiddenStatusBar ) --Physics local physics = require ("physics") physics.start() --Variables local clickCount = 0 local \_h = display.contentHeight local \_w = display.contentWidth local mrand = math.random --Display Groups local background\_display = display.newGroup() local text\_display = display.newGroup() --Main Code------------------------------------------------------------------------------ --Background local background = display.newImage( "table.png", true ) background.x = display.contentWidth / 2 background.y = display.contentHeight / 2 background\_display:insert(background) --Hand local function spawn\_hand() local hand = display.newImage("hand.png", 200, 165) hand.x = 500 hand.y = mrand(85, 280) transition.to( hand , {time = 1000, x = (\_w/2)}) function hand:touch(e) if (e.phase == "began") then clickCount = clickCount + 1 hand:removeSelf() end end hand:addEventListener("touch", hand) end timer.performWithDelay( 900, spawn\_hand, -1 ) --Score local function runtimeListener( event ) local clickCountNumber = display.newEmbossedText(clickCount,240, 300, "fast99.ttf", 45, center) text\_display:insert(clickCountNumber) clickCountNumber:setFillColor(250,250,250) clickCountNumber.x = 240 clickCountNumber.y = 35 end Runtime:addEventListener("enterFrame",runtimeListener)

you seem to be creating a new instance of clickCountNumber, which then overlays on top of the old one. Create a local clickCountNumber outside of the score function, top of file with your other variables, and then to update the score, change clickCountNumber.text

Thank you so much! I figured it out thanks to your advice!

Glad I could help!

you seem to be creating a new instance of clickCountNumber, which then overlays on top of the old one. Create a local clickCountNumber outside of the score function, top of file with your other variables, and then to update the score, change clickCountNumber.text

Thank you so much! I figured it out thanks to your advice!

Glad I could help!