of     1   

Spikexp
#41280708Friday, January 21, 2011 3:00 AM GMT

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.
Spikexp
#41280892Friday, January 21, 2011 3:03 AM GMT

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
Spikexp
#41285418Friday, January 21, 2011 4:26 AM GMT

HelpfulBump. :3
Spikexp
#41508881Tuesday, January 25, 2011 1:11 AM GMT

GUIBump. :3 Any requests...?
Spikexp
#49012002Tuesday, June 21, 2011 12:05 AM GMT

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!
DavyJones118
#60933546Wednesday, January 04, 2012 12:15 PM GMT

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?
Trilliante
#63473387Sunday, February 26, 2012 1:02 PM GMT

Do you know how to make buttons in your gui? If so can you make a tutorial for that?
TINISH0TZ
#63473422Sunday, February 26, 2012 1:04 PM GMT

A GUI that opens up another GUI, the Wiki.

    of     1