How to make text on a brick

Contents

[edit] Introduction

In the real world, bricks are speechless. They can't talk, and they certainly can't conjure text and words above themselves. But ROBLOX isn't the real word, and bricks on ROBLOX aren't real either. Here, there are several simple ways to give your bricks their own personality.

[edit] Humanoid Method

The model on the left has health, and the model on the right does not. To make the brick have no health, set its "MaxHealth" property to 0.
  1. Insert a Model.
  2. Insert a Part into that model.
  3. Change the name of the Part to "Head".
  4. Insert a Humanoid into the model.
  5. Re-name the model to whatever you want to say above the brick.
  6. If you do not want the green bar to be there, simply change the MaxHealth of the humanoid to 0.
  7. The hierarchy in the Explorer panel should now look like this:
  • Tree-collapse.png
    Workspace
    Workspace
    • Tree-collapse.png
      Model
      The text that you want goes here.
      • Part
        Head
      • Humanoid
        Humanoid
Note:Do not change the Transparency of the part called Head to 1. Instead, insert a SpecialMesh into the part and change its MeshType property to FileMesh.



[edit] Changing Words Automatically

Well, there are now words above the part, but as it stands, those words will never change. That's boring! Fortunately, there is a simple way to give the part other things to say. Just put the following script in the model.

Select
local listOfPhrases = {"Example", "Whatever you want", "Hello, world!", "LOL!"} --Just fill this table with whatever you want the part to be able to say.
local interval = 3 --This is the amount of time before the part's text changes to the next phrase.
 
while wait() do
	for k,v in pairs(listOfPhrases) do
		script.Parent.Name = v
		wait(interval)
	end
end

In that example, the part's text will change in the order of values in the table. However, you can also make the part's text be a random value in the table.

Select
local listOfPhrases = {"Example", "Whatever you want", "Hello, world!", "LOL!"} --Just fill this table with whatever you want the part to be able to say.
local interval = 3 --This is the amount of time before the part's text changes to the next phrase.
 
while wait() do
	script.Parent.Name = listOfPhrases[math.random(1, #listOfPhrases)]
	wait(interval)
end

[edit] Chat Service Method

There happens to be a service called Chat. That service contains a method with the same name that creates a speech bubble above a part with whatever text you might want.

The method has three arguments. The first is the part that the speech bubble will appear over. The second is the text that the speech bubble with contain. The third and final argument is the color of the speech bubble. There are only three options for the color: Blue, Green, and Red. Just input them as a string.

After inserting your part, put the following script in it:

Select
local listOfPhrases = {"Example", "Whatever you want", "Hello, world!", "LOL!"} --Just fill this table with whatever you want the part to be able to say.
local interval = 3 --This is the amount of time before the part's text changes to the next phrase.
local color = "Blue" --This can also be "Green" or "Red"
 
while wait() do
	for k,v in pairs(listOfPhrases) do
		game:GetService("Chat"):Chat(script.Parent, v, color)
		wait(interval)
	end
end

The speech bubble will disperse automatically after 3-4 seconds. Feel free to modify the script as you fit.

[edit] BillboardGui Method

Main article: BillboardGui

There is an object called a BillboardGui that allows you to attach a GUI to a 3D object. Here's an example of using one to simulate speech. Just put the script in a part.

Select
local listOfPhrases = {"Example", "Whatever you want", "Hello, world!", "LOL!"} --Just fill this table with whatever you want the part to be able to say.
local interval = 3 --This is the amount of time before the part's text changes to the next phrase.
local textColor = Color3.new(0, 0, 0) --Currently black, change to whatever you want the text color to be.
 
local bbGui = Instance.new("BillboardGui", script.Parent)
bbGui.Adornee = script.Parent --So that the GUI appears above the Part
bbGui.Size = UDim2.new(2, 0, 2, 0)
bbGui.StudsOffset = Vector3.new(-4, 2, 0) --Distance from the actual part relatively, helps center the text
 
local textLabel = Instance.new("TextLabel", bbGui)
textLabel.Size = UDim2.new(5, 0, 1, 0)
textLabel.BackgroundTransparency = 1
textLabel.Font = "ArialBold"
textLabel.TextScaled = true
textLabel.TextColor3 = textColor
 
while wait() do
	for k,v in pairs(listOfPhrases) do
		textLabel.Text = v
		wait(interval)
	end
end

[edit] Dialog Method

Main article: How_to_use_Dialog

The Dialog method is perhaps the most special, because it can be used to make interactive talking bricks. The brick can say something, a player can say something back, and the brick will respond. Pretty cool, no?

First insert a Dialog into the part. Set the InitialPrompt property to whatever you want the first thing the part says to be. Feel free to change the Purpose or Tone properties if you want the speech bubble to look different.

Now insert a DialogChoice into the Dialog. This is where the interactive part comes in. First change the UserDialog property to whatever you want. This is what the player will click on to move to the next part. Then change the ResponseDialog property to whatever you want the part to say in response. You can insert even more DialogChoices into the Dialog for more options, and you can put DialogChoices into other DialogChoices to extend the conversation. The possibilities are endless! Here's an example hierarchy:

  • Tree-collapse.png
    Workspace
    Workspace
    • Tree-collapse.png
      Part
      Part
      • Tree-collapse.png
        Dialog
        Dialog
        • Tree-collapse.png
          DialogChoice
          DialogChoice
          • Tree-collapse.png
            DialogChoice
            DialogChoice
            • DialogChoice
              DialogChoice
          • DialogChoice
            DialogChoice
        • DialogChoice
          DialogChoice

Now, let's check one in action.

Final Dialog Example.gif

[edit] See also