We need to create a way for the player to see how many coins they have collected.

Open your Player Scene.

Add a Label Node

 Godot will switch to 2D mode

 All UI is done in a 2D space.

The editor shows a blue square, 

this is the size of our game window, 

and all elements placed inside 

will be visible on the screen. 

Position elements by dragging mouse, 

and scale them using the orange circles 

Place the label top left.

Add text in the inspector

This updates in the Scene

Score is now also visible in the game window but we will now increase the font size.

Click on Label Settings

Add New LabelSettings

Now change:



Font Size


Outline Size

Outline Colour

Now the score is more visible

Rename the label to ScoreText

Updating the score programmatically

Add a reference variable to our label node:

Now update the label in add_score()

str() converts numeric values to text.

Play Test your game to ensure it is working as expected.