Hi, first sorry for my english,
I have a scene “gameover.lua” that is open with showOverlay, and in scene:create I want to show or not a newText according to the case.
For this I try multiple solutions, but when I put the code so that it does not see , the text is not seen in any case.
e.g.:
local newHighScore = false if currentScore \> currentHighScore then newHighScore = true end local newHighScoreLabel = display.newText("New high score!!", 100, 100) if (newHighScore) then newHighScoreLabel.alpha = 1 else newHighScoreLabel.alpha = 0 end sceneGroup:insert(newHighScoreLabel )
This not show the newText.
If I coment --newHighScoreLabel.alpha = 0 then show it
But in all solutions when I write the part to hide or make text “” in any case show me the text.
and I have another code in true part and it works perfectly.
any help is appreciated!!