generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Understanding GUI's Part: 2

Previous Thread :: Next Thread 
Spikexp is not online. Spikexp
Joined: 05 Aug 2008
Total Posts: 513
20 Jan 2011 09:00 PM
Understanding GUI's Part: 2


Now, we've obviously read the first post (http://www.roblox.com/Forum/ShowPost.aspx?PostID=30858898 for those that haven't), so we'll go from there. We're even going to do some scripting! But first, a Quick Re-cap.

-We should call it a G-U-I instead of “gooey” when learning (Although it's completely acceptable to pronounce it “gooey”
-Inserting and Sizing objects is easy!
-Inserting Images is easy!
-Changing colours is easy!
-We also learned what each part of a GUI is, and how it's used

So, we've made the base of our GUI, and we've even put images in it, too. Now, we're going to put some changing text. Just because we can.
0. This is zero, because it's not really an “instruction”. You have to open Output to view problems with your script, even though there shouldn’t be...
View>Output
1. To start off, insert a Text Label into your basic GUI Insert>Object>TextLabel
2. Change the size of X to 1, as this means it's as wide as your GUI
3. Change the size of Y to 0.1, or whatever makes it just high than the text
4. Ignore the text right now, it doesn't really matter.
5. Insert a script into the Label you just made. (Woohoo!) Insert>Objects>Script
(Third column, fourth from the bottom) Make sure it does NOT say “LocalScript”*
6. Double click on the script. It should be called “Script”
7. Once it's open, your script should just say print 'Hello World'
8. That's a pretty lame script. Also, it only will print “Hello World”, so we're going to change it. First, delete print “Hello World”. Then, we'll start with [ while true do ]. This makes it a loop.
--Remove the square brackets, this is just telling YOU what is supposed to go in the script.
9. After that, type in [ a=”text here” ] then put in what you want the text to say first
10. Then put [ b=”text here” ]. Make “text here” the second thing you want it to say.
--For simplicities sake, this will only be two options, but play around with the script to do more.
-- Pro Tip! Always make sure your text is in quotation marks!
11. Now write in [ script.Parent.Text=a ].This is basically telling Roblox that “This script's Parent's “Text” variable should be 'text here' “
12. Then we'll place a “wait()” I put in [ wait(3) ] because that gives enough time to read, without lasting too long.
--Tech Jargon: “wait(3)” tells Roblox “Pause for 3 seconds” The three can be changed to any number.
13. Now we have to change it to the other text. Can you guess what it will be? If you said [ script.Parent.Text=b ], you're right!
14. We'll put in another [ wait(3) ] so that it pauses for another three seconds...
15. Then we write “end”, so that Roblox knows that we've ended the script.
--Pro Tip! We aren't actually ending the script, we're ending the function “while true do”


*Most good scripters would say “You fool, A local script will still let the script run!”
Yes, I know that, but basics first. No need to rush into things, amirite?

Please request things, I don't know what you guys want!
Seriously, I'm at a loss for ideas...

Happy Scripting!
--Spikexp

::GLOSSARY::
Roblox: is a massively multiplayer online game (MMOG) virtual playground and workshop designed for children aged 6 and over.
GUI: Graphical User Interface
“--Pro Tip!”: A snippet of information not necessary at a low level of something, but possibly useful later on
“--Tech Jargon:”: Help understanding a certain term, or terms, used in the last sentence/instruction.
“--”: Marks a comment that may be helpful to the instruction at hand.
Report Abuse
Spikexp is not online. Spikexp
Joined: 05 Aug 2008
Total Posts: 513
20 Jan 2011 09:03 PM
Hmm. Don't know why this is wrong...
"5. Insert a script into the Label you just made. (Woohoo!) Insert>Objects>Script
(Third column, fourth from the bottom)"

should say

"5. Insert a script into the Label you just made. (Woohoo!) Insert>Objects>Script
(Second column, fifth from the bottom)"

Thanks.

Happy Scripting!
--Spikexp
Report Abuse
Spikexp is not online. Spikexp
Joined: 05 Aug 2008
Total Posts: 513
20 Jan 2011 10:26 PM
HelpfulBump.
:3
Report Abuse
Spikexp is not online. Spikexp
Joined: 05 Aug 2008
Total Posts: 513
24 Jan 2011 07:11 PM
GUIBump.
:3

Any requests...?
Report Abuse
Spikexp is not online. Spikexp
Joined: 05 Aug 2008
Total Posts: 513
20 Jun 2011 07:05 PM
LateBump
:3

Yes, it is old. But it still works, and people need to learn.

ALSO! The final script SHOULD look like this:

while true do
a=”text here”
b=”text here”
script.Parent.Text=a
wait(3)
script.Parent.Text=b
wait(3)
end

--And that's it.

Line 15 should say:
"15. Then we write “end”, that way Roblox knows that we've ended the script. So, write in [ end ]."

NOT

"15. Then we write “end”, so that Roblox knows that we've ended the script."

Silly mistake. :P

PLEASE! Give me ideas! I need help! What do you want your GUI to do? Would you like a leaderboard? A store? A timer? What?!
Do tell!
Report Abuse
DavyJones118 is not online. DavyJones118
Joined: 07 Jun 2011
Total Posts: 370
04 Jan 2012 06:15 AM
You have great tutorials, how would we make a GUI that opens up another GUI, like say I wanted a shop and we clicked on a DIALOGUE CHOICE then it would open a GUI?
Report Abuse
spottaffy1 is not online. spottaffy1
Joined: 23 Sep 2010
Total Posts: 189
26 Feb 2012 07:02 AM
Do you know how to make buttons in your gui? If so can you make a tutorial for that?
Report Abuse
TINISH0TZ is online. TINISH0TZ
Joined: 20 Nov 2009
Total Posts: 2549
26 Feb 2012 07:04 AM
A GUI that opens up another GUI, the Wiki.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image