Text not showing

I’m trying to add text, but it won’t show for some reason. I put the newText code in the beginning, end, middle, changed the x and y coordinates, but that doesn’t seem to help.

Can you share some code?  Make sure to copy/paste the code in using the code formatting option (the blue <> in the row with Bold, Italic, etc.)

Thanks

Rob

The code works when I put it in the main lua file but when I put it in my game lua file it doesn’t show.

local myText = display.newText( “Hello World!”, 400, 400, native.systemFont, 100 )

Do you add a group after the text?

It may be behind something else

Are you adding anything like a background image in main.lua?  Any display objects not added to a scene sit on top of the display and will hide anything up into a scene.

Rob

Can you share some code?  Make sure to copy/paste the code in using the code formatting option (the blue <> in the row with Bold, Italic, etc.)

Thanks

Rob

The code works when I put it in the main lua file but when I put it in my game lua file it doesn’t show.

local myText = display.newText( “Hello World!”, 400, 400, native.systemFont, 100 )

Do you add a group after the text?

It may be behind something else

Are you adding anything like a background image in main.lua?  Any display objects not added to a scene sit on top of the display and will hide anything up into a scene.

Rob