Hi @clcheah,
Could you please post the Share link to the project in question? I know this is a common issue people have had. Having the specific link will help us better find the issue causing the problem.
I took a look at the project and the last action is to draw the sprites. Since the background is a sprite, it is drawn on top of the text. You might want to try to draw the text last (below the drawSprites block) as order matters, even inside the draw loop.
I get this issue a lot. As Mike suggested, first thing to try is putting text command below drawsprites command in draw loop. However, sometimes that does not do what you want. I see this problem occur many times when trying to write text like “You WIN” or “You Lose” depending on the score. I suggest 2 things to students:
Take a background sprite and modify it to add the text you want, for example, WIN or LOSE. Note, for some reason, there is no text tool in the animation editor.
Second is only to drawsprites when game is not lost or won. Here’s a code example of that.
var main = createSprite(200, 200);
var char = createSprite(200, 200);
char.setAnimation(“virus02_04_1”);
char.scale = 0.25;
main.setAnimation(“abstract_08_1”);
var score = 0;
fill(“black”);
textSize(32);
function draw() {
score = score + 1;
if (score > 50) {
background(“white”);
text(“WINNER!”, 100, 100);
} else {
drawSprites();
text("Score: " + score , 21, 50);
}
}