In the articles/Intro to GUIs and articles/Using photos in GUIs guides, friend learned just how to placed GUIs top top a display “canvas” and display it to players in your game. GUIs space not restricted to only the screen, however. Making use of surface GUIs, girlfriend can include interfaces directly into her game human being to produce shop signs, keypad panels for locked doors, or even touch screens.

You are watching: How to put text on a block in roblox

Creating a straightforward Surface GUI

In this an initial example, fine explore setup up a surface GUI because that a non-interactive surface object, choose a sign or painting.

Create a sign Board

Before developing the surface ar GUI, you’ll need a straightforward block to connect it to. The block will have to be a certain size to enhance the surface GUI we’re going to make.

Create a wide, thin part exactly 8 studs across (X) and 4 studs high (Y).
*

For this demo, it"s vital that the block is 8 studs across and 4 studs high (this will certainly be explained an ext in a bit). To inspect and collection the size exactly, watch the Properties home window and broaden the PartSize tree.
Rename the part SignBoard.
*

Create the surface ar GUI

Now let’s produce a surface GUI together a straight child of the signboard part.

In the explorer window, float over the SignBoard object and also click the circle ⊕ button.
*
Select SurfaceGui indigenous the popup menu. This creates an empty surface GUI room on the front surface ar of the part.
*

Add a text Label

Just like once you create a brand-new ScreenGui an are on the screen, a brand-new SurfaceGui starts out together a blank canvas that spans one full surface the the part (front, top, back, left, etc.).

Many things have the right to be included to a surface ar GUI, however we’ll begin with a straightforward text label. In the explorer window, discover the brand-new SurfaceGui object and insert a TextLabel right into it.

*

This will add a plain text label to the front surface of the part.


*

Depending on your camera view, you can be looking in ~ the earlier surface of the part, no the front surface where the GUI is located. If friend don"t view the label, move your camera around to the other side.

Set the Canvas Size

As listed earlier, a surface ar GUI takes up one complete surface of a part. In this example, it’s situated on the front surface ar of the component which is the default because that all brand-new surface GUIs.

Depending top top which surface ar of the component the GUI is put on, it’s smart to collection the canvas size to the same proportions. Due to the fact that the part is 8 studs throughout and 4 studs high, the front surface ar (outlined in yellow) is likewise 8 studs across and 4 studs high.

*

A an excellent starting suggest is to collection the canvas width and also height come 100 time the surface’s stud length in each direction.

In the explorer window, make certain the SurfaceGui thing is quiet selected.
*
In the nature window, expand the CanvasSize values.
*
Change the Y value to 400 since the surface is 4 studs high (the X value have the right to remain at 800 due to the fact that the surface is 8 studs across).
*

Great! friend won’t see a big difference in the message label’s appearance, but setup a canvas size that’s proportional to the surface size gives you a consistent room for designing GUIs.

Customize the Label

Now let’s readjust the message label nature so the message label is centered and also fills many of the former surface. If you should review text label properties, please view the articles/Intro to GUIs guide.

Click on the text label in the traveler if the not currently selected.In the properties window, discover the AnchorPoint properties. Collection both X and Y to 0.5 so that the anchor is centered.
*
Change BackgroundColor3 to her favorite color.Set BorderSizePixel come 0 to remove the label’s border.For Position, set both XScale and YScale to 0.5. This will center the label within the limit of the surface GUI.
*
In the Size section, set XOffset come 750 and YOffset come 350. Because you collection the canvas size to 800×400 (X×Y), the text label will now take up nearly the entire canvas.
*
Now get creative with other text properties for the label. For example, readjust the Font, Text, TextColor3, TextSize, TextWrapped, and more to make a really expert signboard!
*

Light Influence

Normally, the GUI room will share the same amount that light as the surface it’s on — if that surface is in the dark or covered by shadow, text or photos that you put inside the GUI will also be in the dark.

See more: Br A Poem That Is Told In An Actual Manner, A Poem That Is Told In An Actual Manner

To readjust how much a GUI is affected by its surface light, adjust the LightInfluence property. The typical value is 1, definition the GUI an are will it is in lit just like what’s around it. If you set it come 0, photos inside will appear just as light (or dark) together you design them. This can be beneficial if you want to produce something favor a neon sign which glows bright even if it’s in a dark environment.