In the articles/Intro come GUIs and articles/Using pictures in GUIs guides, you learned exactly how to placed GUIs ~ above a screen “canvas” and also display it to football player in her game. GUIs room not restricted to just the screen, however. Making use of surface GUIs, friend can include interfaces straight into your game human being to create shop signs, keypad panels because that locked doors, or even touch screens.
You are watching: Roblox how to add text to a brick
Creating a an easy Surface GUI
In this first example, we’ll explore setup up a surface ar GUI for a non-interactive surface object, choose a sign or painting.
Create a sign Board
Before producing the surface GUI, you’ll need a basic block to attach it to. The block will need to be a details size to complement the surface ar GUI we’re going to make.Create a wide, thin component exactly 8 studs across (X) and 4 studs high (Y).
For this demo, it"s important that the block is 8 studs across and 4 studs high (this will be explained an ext in a bit). To examine and collection the size exactly, check out the Properties home window and broaden the Part → Size tree.
Rename the part SignBoard.
Create the surface ar GUI
Now let’s produce a surface ar GUI together a straight child that the signboard part.In the explorer window, float over the SignBoard object and also click the circle ⊕ button.
Add a text Label
Just like when you develop a new ScreenGui room on the screen, a brand-new SurfaceGui beginning out together a empty canvas that spans one complete surface of the part (front, top, back, left, etc.).
Many things can be included to a surface ar GUI, yet we’ll start with a an easy text label. In the traveler window, discover the new SurfaceGui object and insert a TextLabel into it.
This will include a level text brand to the front surface ar of the part.
Depending on her camera view, you can be looking at the back surface of the part, no the front surface ar where the GUI is located. If you don"t see the label, relocate your camera around to the other side.
Set the Canvas Size
As detailed earlier, a surface ar GUI takes increase one complete surface that a part. In this example, it’s situated on the front surface of the part which is the default for all brand-new surface GUIs.
Depending on which surface of the part the GUI is placed on, it’s clever 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 also 8 studs throughout and 4 studs high.
A great starting allude is to collection the canvas width and also height come 100 times the surface’s stud size in every direction.In the traveler window, make certain the SurfaceGui object is still selected.
Great! you won’t see a big difference in the message label’s appearance, but setup a canvas dimension that’s proportional come the surface size provides you a consistent room for designing GUIs.
Customize the Label
Now let’s adjust the message label nature so the text label is centered and also fills most of the former surface. If you need to review text label properties, please see the articles/Intro to GUIs guide.Click top top the message label in the explorer if the not currently selected.In the properties window, discover the AnchorPoint properties. Collection both X and also Y come 0.5 so that the anchor is centered.
Normally, the GUI space will re-publishing the very same amount the light together the surface it’s on — if that surface ar is in the dark or covered by shadow, message or photos that you placed inside the GUI will likewise be in the dark.
See more: Why Does My Nest Thermostat Keeps Restarting ? Here'S What To Try
To change how much a GUI is influenced by its surface light, change the LightInfluence property. The common value is 1, definition the GUI space will it is in lit just like what’s around it. If you collection it come 0, pictures inside will show up just together light (or dark) as you design them. This can be useful if you desire to develop something favor a neon authorize which glows bright even if the in a dark environment.