How to make text on a brick: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>FlyingRobin121
>Quenty
No edit summary
 
(42 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{CatUp|Tutorials}}
{{CatUp|Tutorials}}
 
__TOC__
== Introduction ==
== Introduction ==


Yep. Your bricks are speechless. You can't see a thing it says. It's just a regular normal brick. That's why I have made this guide to show you how to make text on a brick! 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.
 
__TOC__
 
== Note ==
 
You need to be a medium level builder to do this. Not a scripter, a builder. Otherwise, this guide will make no sense to you at all. Rack up at least 10 people that has your place, and then you're ready for this. If you read on but have not achieved this goal, good luck understanding the word humanoid!


== Starting it up ==
== Starting it up ==


Open Roblox Studio. Then click on the blank paper button in your toolbar. That will open up a new place. Make sure you have those stuff. Editing a place in Roblox Studio is a lot more 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 ==
 
We've got the preparing done, now it's time to do the real thing. Go to insert in your toolbar and select "Model". If you need to type it, type in Model. Please note that spelling and captilazion needs to be correct.
 
Click the insert button and click on any color of brick. Now make all surfaces smooth. The last sentence is optional because all smooth or not, it will still work.
 
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.
 
In Explorer, drag the brick and put it in Model. Once you've done that, name the brick "Head". Spelling and captilzation needs to be correct
when spelling Head.


Now go to Insert in the toolbar and select Object. Select Humanoid or type in "Humanoid". Spelling and captilazion needs to be correct for that too. Now using Explorer, drag the humanoid into Model. And there you have it! A brick that has text!
== The humanoid method ==


#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 49: Line 41:


script.Parent.Parent.Name = "Insert text 1 here." -- Change my text to your text.
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.
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
</pre>


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


script.Parent.Parent.Name = "Insert text 2 here." -- Change my text to your text.
== Humanoid Health Bug Fix ==
 


wait(1) -- Change the time in between changing from the current text to the next text.
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).


--If you want it to have more text looping, copy the script.Parent.Parent.Name = "..." and the wait() lines.
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>


--Then change to your prefernce.
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.


end
'''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.
</pre>


== See also ==
== See also ==
[[RBX.Lua.Humanoid]]
[[RBX.lua.Humanoid (Object)]]
[[category: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)