Help me to fix my bug

can you guys help me with this bug why mytext isnt diplaying i wrote everything correctly can you guys help me please 

here is the code

display.setStatusBar( display.HiddenStatusBar )

– Start Physics

local physics = require(“physics”)

physics.start()

– Set Variables

_W = display.contentWidth; – Get the width of the screen

_H = display.contentHeight; – Get the height of the screen

motionx = 0; – Variable used to move character along x axis

motiony = 0; – Variable used to move character along y axis

speed = 2; – Set Walking Speed

jump = 3;-- set jumping speed

score=0;

local myText = display.newText(score,_W-20,_H-20, native.systemFont, 30 )

– Add Sky to the background

local sky = display.newImage(“background_sky.png”)

sky.x = _W/2; sky.y = 160;

– add platform1 to game

local platform1 = display.newImage( “grass.png”)

platform1.width=100;platform1.height=20;platform1.x=150;platform1.y=_H/2;

physics.addBody(platform1,“static”,{ friction=0.5, bounce=0.3 })

– add platform2 to game

local platform2 = display.newImage( “grass.png”)

platform2.width=100;platform2.height=20;platform2.x=350;platform2.y=_H/2-70;

physics.addBody(platform2,“static”,{ friction=0.5, bounce=0.3 })

– Add Grass floor to game

local grass_bottom = display.newImage( “grass_bottom.png”)

grass_bottom.x = _W/2; grass_bottom.y = _H-35;

–grass_bottom:setReferencePoint(display.BottomLeftReferencePoint)

physics.addBody( grass_bottom, “static”, { friction=0.5, bounce=0.3 } )

– Add Grass to the background

local grass_top = display.newImage( “grass_top.png”)

grass_top.x = _W/2; grass_top.y = _H-95;

– Add Guy

local guy = display.newImage( “guy.png” )

physics.addBody( guy, “dynamic”, { friction=0.5, bounce=0 } )

guy.x = 2; guy.y = 150;

– Add left joystick button

local left = display.newImage (“btn_arrow.png”)

left.x = 45; left.y = 280;

left.rotation = 180;

– Add right joystick button

local right = display.newImage (“btn_arrow.png”)

right.x = 120; right.y = 282;

– add up joystick button

local up = display.newImage (“btn_arrow.png”)

up.x = 195;up.y=280;

up.rotation=-90;

– Stop character movement when no arrow is pushed

local function stop (event)

if event.phase ==“ended” then

motionx = 0;

motiony = 0;

end

end

Runtime:addEventListener(“touch”, stop )

– Move character

local function moveguy (event)

if guy.x < _W - 2 then

if guy.x > 2 then

    guy.x = guy.x + motionx;

guy.y = guy.y - motiony;

end

if guy.x == 2 then

    guy.x=3;

end

if guy.x < 2 then

    guy.x=3;

end

if guy.x < _W - 2 then

    guy.x = guy.x + motionx;

guy.y = guy.y - motiony;

end

if guy.x == _W - 2 then

    guy.x=_W-3;

end

if guy.x > _W - 2 then

    guy.x=_W-3;

end

end

end

Runtime:addEventListener(“enterFrame”, moveguy)

– When left arrow is touched, move character left

function left:touch()

motionx = -speed;

end

left:addEventListener(“touch”,left)

– When right arrow is touched, move character right

function right:touch()

motionx = speed;

end

right:addEventListener(“touch”,right)

– When up arrow is touched, move character up

function up:touch()

motiony = jump;

end

up:addEventListener(“touch”,up)

Hello @davitzuroshvili. Welcome to the Corona Labs forums. Speaking on behalf of the community, we really would like to help you. But we also have a mantra:  “Help us help you”. Your post doesn’t do a good job of explaining your problem. You’ve posted a lot of unformatted code which is very hard to read and understand what is going on.

There is a great post that all first time posters should read so that you can get the best answers possible. Please take a few minutes to read:

https://forums.coronalabs.com/topic/55780-ask-a-better-question-get-a-better-answer/

and the followup comments. For future posts, please use the guidelines listed there. In the mean time for this question, it has to do with how images are layered on the screen. They are layered in the order coded. You create the text first, then you create the sky and ground next. I’m guessing (without seeing your art) that the ground is being drawn on top of your text hiding it.  Simply move the text creation code further down so it’s drawn on top.

There are more advanced ways of layering your items using display.newGroup() to let you organize things better, but for now, the simplest fix is to move the myText creation further down in the code after the sky and ground elements are created.

Rob

Hello @davitzuroshvili. Welcome to the Corona Labs forums. Speaking on behalf of the community, we really would like to help you. But we also have a mantra:  “Help us help you”. Your post doesn’t do a good job of explaining your problem. You’ve posted a lot of unformatted code which is very hard to read and understand what is going on.

There is a great post that all first time posters should read so that you can get the best answers possible. Please take a few minutes to read:

https://forums.coronalabs.com/topic/55780-ask-a-better-question-get-a-better-answer/

and the followup comments. For future posts, please use the guidelines listed there. In the mean time for this question, it has to do with how images are layered on the screen. They are layered in the order coded. You create the text first, then you create the sky and ground next. I’m guessing (without seeing your art) that the ground is being drawn on top of your text hiding it.  Simply move the text creation code further down so it’s drawn on top.

There are more advanced ways of layering your items using display.newGroup() to let you organize things better, but for now, the simplest fix is to move the myText creation further down in the code after the sky and ground elements are created.

Rob