JavaScript text

how do i add text that has the value of a variable trough code

Can you explain in more detail what you are trying to achieve please? Do you want to display a text string on screen?

yes i want to add a string of text on the screen

Hello @Aiden_The_coder!

You could start out by placing a Text Element onto a 2d Screen.

Change the text via script on text element:

this.entity.element.text = variable;
3 Likes