How to make text on a brick: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Gordonrox24
>Quenty
No edit summary
 
(26 intermediate revisions by 7 users not shown)
Line 3: Line 3:
== Introduction ==
== Introduction ==


Your bricks are speechless. You can't see or hear a thing it says. It's just a regular normal boring brick. That's why I have made this guide to show you how to your normal bricks, exciting and talkative. You will also learn about the humanoid feature.
Your bricks are speechless. You can't see or hear a thing it says. It's just a regular normal boring brick. This guide is the tool you need to show you how to change your normal bricks, into exciting and talkative ones. You will also learn about the humanoid feature.
 
Note: if the brick is completely invisible(The transparency is set to 1), the text will not show up. Make sure the transparency is 0.9 or lower.


== Starting it up ==
== Starting it up ==
Line 11: Line 9:
Open Roblox Studio. Then click on the blank paper button in your toolbar. That will open up a new place. Editing a place in Roblox Studio is a lot easier than editing a place in "Play Solo". You can move your camera freely in Roblox Studio while you need to get past obstacles in "Play Solo".
Open Roblox Studio. Then click on the blank paper button in your toolbar. That will open up a new place. Editing a place in Roblox Studio is a lot easier than editing a place in "Play Solo". You can move your camera freely in Roblox Studio while you need to get past obstacles in "Play Solo".


== Steps ==
== The humanoid method ==
 
1. Go to insert in your toolbar and select Object... "Model".
 
2a. Click the insert button on the grey toolbar and click on any brick.  It should currently be named "Smooth Block Model".
 
2b. (Optional). Now make the brick a 5x1x5, or any other reasonable length, width, or height. If you want to make the brick a step-on, I'd sugguest the size to be 3 or less.
 
3.In Explorer, drag the brick and put it in Model. Once you've done that, rename name the "Smooth Block Model" brick "Head". Spelling and captilzation needs to be correct when spelling Head.
 
4.Now go to Insert in the toolbar and select Object. Select Humanoid or type in "Humanoid". Spelling and capitalization needs to be correct for that too. Now using Explorer, drag the humanoid into Model. Note: if you have "Head" selected while looking for "Humanoid", you won't find it.  Click "Model" once, then look in Insert/Object for Humanoid.


#Insert a model. Insert > Object > Model (<i>Instance.new("Model", Workspace)</i>).
#Insert a part. Insert > Object > Part (<i>Instance.new("Part", Workspace.Model)</i>). Make sure you are selecting the model while doing so.
#Change the name of the Part to "Head".
#Insert a humanoid inside of the model. Insert > Object > Humanoid (<i>Instance.new("Humanoid, Workspace.Model)</i>) (DO NOT PUT IT INSIDE THE BRICK!)
#There will be a message over the brick. If you didn't rename the model, it would say "Model".
#Rename the model to whatever you want to say above the brick.
#(OPTIONAL) If you want it to be invisible, DO NOT set the Transparency level! Instead, insert a SpecialMesh into your part. Change the MeshType to FileMesh.
#(OPTIONAL #2) If you do not want the green bar to be there, simply change the MaxHealth of the humanoid to zero (0).
[[File:HumanoidExample.png|thumb|400px|The model on the left has health, and the model on the right does not. ]]
== You did it! ==
== You did it! ==


Line 51: Line 48:
end
end
</pre>
</pre>
And there you go! You have now put text into your brick with a script!
== Humanoid Health Bug Fix ==
As some of you have noticed, when you try to make humanoid's health and max health bigger than 100, the humanoid "dies" when you test your place (Health becomes 0). However, there is a simple way to fix that-using a simple script. Previous script did not work. Step by step:
1.In your "Humanoid" object, create a script (Insert->Object->Script).
2.Make sure the script is inside the humanoid object, not your model.
3.Add this to it:
  <pre>--Humanoid bug fix by nickguletskii200
h = Script.Parent --Humanoid
for 1,15 do --change 15 into how many seconds your place takes to load + 15
  wait(1) --wait for a second and try again
  h.MaxHealth = 160 --Change that into required MaxHealth
  h.Health = 160 --Change that into required Health
end</pre>
4.Edit value of for loop from 15 to how many seconds it takes to load your place + 15 more.
5.Edit Health Values.
'''Explanation''': Script runs every one second for some amount of seconds since start of the server to change humanoid's health. Previous script did not work because script stopped before humanoid was even created.
'''WARNING''': Make sure that humanoid has head and torso connected using studs and inlets. Weld/glue/smooth wont work. Also make sure that the humanoid is not "dead" before you add the script.


== See also ==
== See also ==
[[RBX.lua.Humanoid (Object)]]
[[RBX.lua.Humanoid (Object)]]
[[Category:Scripting Tutorials]]
[[Category:Scripting Tutorials]]

Latest revision as of 07:46, 29 February 2012

Introduction

Your bricks are speechless. You can't see or hear a thing it says. It's just a regular normal boring brick. This guide is the tool you need to show you how to change your normal bricks, into exciting and talkative ones. You will also learn about the humanoid feature.

Starting it up

Open Roblox Studio. Then click on the blank paper button in your toolbar. That will open up a new place. Editing a place in Roblox Studio is a lot easier than editing a place in "Play Solo". You can move your camera freely in Roblox Studio while you need to get past obstacles in "Play Solo".

The humanoid method

  1. Insert a model. Insert > Object > Model (Instance.new("Model", Workspace)).
  2. Insert a part. Insert > Object > Part (Instance.new("Part", Workspace.Model)). Make sure you are selecting the model while doing so.
  3. Change the name of the Part to "Head".
  4. Insert a humanoid inside of the model. Insert > Object > Humanoid (Instance.new("Humanoid, Workspace.Model)) (DO NOT PUT IT INSIDE THE BRICK!)
  5. There will be a message over the brick. If you didn't rename the model, it would say "Model".
  6. Rename the model to whatever you want to say above the brick.
  7. (OPTIONAL) If you want it to be invisible, DO NOT set the Transparency level! Instead, insert a SpecialMesh into your part. Change the MeshType to FileMesh.
  8. (OPTIONAL #2) If you do not want the green bar to be there, simply change the MaxHealth of the humanoid to zero (0).
The model on the left has health, and the model on the right does not.

You did it!

You have just made a brick that has text on it. Now if you're a good scripter, you may just want to make it a buy button or a cash adder or anything! If a buy button, you may just start Robloxia's next sucessful tycoon! How exciting!

Tips

Change "Model" to "First text" to make it say First text. Also you can do any text you want with that (But make sure it's good and nice).


Look in Humanoid. Find Health and Max Health. If you want one without a green bar, change both of them to 0. This is least recommended for people making npc's, but most recommended for those making buttons. That way, it will look a lot neater. If the humanoid's Health and MaxHealth is greater than 0, someone can use a weapon and "kill" it. If you are making an npc(non player character) and someone kills it, all the model's brick snaps get broken. That is why you "fall apart" when you die. But if the parts of the body are Anchored, they will not fall apart.

Script to change words

If you want the brick to say (for example) "Hi!" *waits* "What's your name?" *waits* "Me too!" *waits* Then insert this script into the head or torso.


while true do


script.Parent.Parent.Name = "Insert text 1 here." -- Change my text to your text.
wait(1) -- Change the time in between changing from the current text to the next text.
script.Parent.Parent.Name = "Insert text 2 here." -- Change my text to your text.
wait(1) -- Change the time in between changing from the current text to the next text.
--If you want it to have more text looping, copy the script.Parent.Parent.Name = "..." and the wait() lines.
--Then change to your prefernce.
end

And there you go! You have now put text into your brick with a script!

Humanoid Health Bug Fix

As some of you have noticed, when you try to make humanoid's health and max health bigger than 100, the humanoid "dies" when you test your place (Health becomes 0). However, there is a simple way to fix that-using a simple script. Previous script did not work. Step by step:

1.In your "Humanoid" object, create a script (Insert->Object->Script).

2.Make sure the script is inside the humanoid object, not your model.

3.Add this to it:

--Humanoid bug fix by nickguletskii200 
h = Script.Parent --Humanoid
for 1,15 do --change 15 into how many seconds your place takes to load + 15
  wait(1) --wait for a second and try again
  h.MaxHealth = 160 --Change that into required MaxHealth
  h.Health = 160 --Change that into required Health
end

4.Edit value of for loop from 15 to how many seconds it takes to load your place + 15 more. 5.Edit Health Values.

Explanation: Script runs every one second for some amount of seconds since start of the server to change humanoid's health. Previous script did not work because script stopped before humanoid was even created.

WARNING: Make sure that humanoid has head and torso connected using studs and inlets. Weld/glue/smooth wont work. Also make sure that the humanoid is not "dead" before you add the script.

See also

RBX.lua.Humanoid (Object)