In the code below when tally(hit) calls the tally function a counter number is displayed BUT when the function is called again the previous number does not disappear but rather is displayed on top of the previous number.
for example at first 1 is displayed but when it is time to display 2 it is put on top of 1. How can I display the numbers one at a time so the user would see a counter 1 then 2 etc.
function tally (score)
local t = display.newText(“0” , 90, 15, “ArialRoundedMTBold”, 20 )
t:setTextColor( 250, 250, 250 )
t.text = score
end
–***********************
hit = hit + 1
tally( hit)
[import]uid: 22152 topic_id: 6376 reply_id: 306376[/import]