function ball:touch(e)
--add 1 to the score and print the score when the user touches the ball
--(on initial contact)
if(e.phase == “began”) then
score = score + 1
print(score)
local myTextObject = display.newText((score), 160, 20, “Arial”, 30 )
myTextObject.alpha = 1
– Tells the game to fade the number out after 2 seconds.
transition.to( myTextObject, { time=2000, alpha=0,} )
end
end
The problem i am having is that the score is overlapping, i tried adding .alpha to make it disperse faster, although it still looks messy! Can anyone offer me some help? Thanks!