Menu
CoddyTech

A Label on Screen

Part of the Game Rules section of Coddy's Godot journey. Lesson 6 of 29.

A Label node shows text on the screen. Set its text to change what it shows:

$Message.text = "Hello!"

Game labels go in a CanvasLayer. It is drawn on top of the game and stays fixed on the screen, even when a camera moves.

Open the Scene tab. This room has a CanvasLayer called HUD (heads up display). It holds an empty Label called Score in the top left corner. Its path from Main is HUD/Score.

challenge icon

Challenge

Easy

When the game starts, make the label in the corner show Score: 0.

Try it yourself

extends Node2D

func _ready():
	pass
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Game Rules

Practice on your own: Godot playground