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
- Insert a Model.
- Insert a Part into that model.
- Change the name of the Part to "Head".
- Insert a Humanoid into the model.
- Re-name the model to whatever you want to say above the brick.
- If you do not want the green bar to be there, simply change the MaxHealth of the humanoid to 0.
- The hierarchy in the Explorer panel should now look like this:
[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.
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.
[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:
The speech bubble will disperse automatically after 3-4 seconds. Feel free to modify the script as you fit.
[edit] BillboardGui Method
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.
[edit] Dialog Method
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:
Now, let's check one in action.
