Lua Help: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
No edit summary
Link the DHTML page here!
 
(129 intermediate revisions by 26 users not shown)
Line 1: Line 1:
[http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/rofev.htm free ringtones] [http://ist.greenville.edu/drupal/files/pobiwi.html diazepam online] [http://bugzilla.internet2.edu/attachment.cgi?id=751 free sprint ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000345.html lortab online] [http://grid.unimelb.edu.au/twiki/pub/Main/JamesMiller/bopogo.htm buy carisoprodol] [http://dcc.syr.edu/dforum/message.asp?MessageID=49071 free verizon ringtones] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/relu.htm buy clomid] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/sifus.htm xenical online] [http://bugzilla.internet2.edu/attachment.cgi?id=759 xanax online] [http://www.hollins.edu/ubb/Forum32/HTML/000360.html free free ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=43 cheap wellbutrin] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=15 carisoprodol online] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/DikVolirev tracfone ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/popuxo.htm sharp ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000291.html buy ativan] [http://ist.greenville.edu/drupal/files/covubi.html buy norco] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/wetule.htm sony ericsson ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000362.html free tracfone ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49075 sonyericsson ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=48901 soma online] [http://www.hollins.edu/ubb/Forum32/HTML/000293.html meridia online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/gelol.htm zyban online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/rigyse.htm clonazepam] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/kohe.htm free music ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/pybex.htm cyclobenzaprine online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/pero.htm ativan online] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/huvixu.htm cheap paxil] [http://grid.unimelb.edu.au/twiki/pub/Main/JackLawson/nunuso.htm cheap ativan] [http://dcc.syr.edu/dforum/message.asp?MessageID=49046 nexium] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/cohufyk.htm mp3 ringtones] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/vekorot.htm cheap hgh] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/kuky.htm propecia online] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=268 free samsung ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BettySmith/kyzefe.htm online ortho] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/wydyty.htm but zyban] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/gefu.htm punk ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000340.html cheap lipitor] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/ruviti.htm mtv ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000346.html cheap vigrx] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=41 cheap lorazepam] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/RingoFloper fioricet online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/tuju.htm lorazepam online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/sypev.htm cool ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=30 qwest ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000289.html cheap diazepam] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/kuhufid.htm cheap tenuate] [http://dcc.syr.edu/dforum/message.asp?MessageID=49028 cheap clonazepam] [http://dcc.syr.edu/dforum/message.asp?MessageID=49015 buy fioricet] [http://bugzilla.internet2.edu/attachment.cgi?id=725 ativan online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=36 buy clonazepam] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/zivesup.htm propecia online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49061 mp3 ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/donyki.htm hydrocodone online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/hywi.htm cheap carisoprodol] [http://dcc.syr.edu/dforum/message.asp?MessageID=49051 cheap didrex] [http://www.hollins.edu/ubb/Forum32/HTML/000300.html levitra online] [http://bugzilla.internet2.edu/attachment.cgi?id=738 nextel ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000356.html cheap zyban] [http://bugzilla.internet2.edu/attachment.cgi?id=736 free mp3 ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=38 levitra] [http://www.hollins.edu/ubb/Forum32/HTML/000341.html celexa online] [http://grid.unimelb.edu.au/twiki/pub/Main/NoriJohn/rupo.htm free tracfone ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=27 adipex online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49056 free ringtones] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/wypo.htm free music ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=29 nextel ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49054 free nokia ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/putyh.htm levitra online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/PhillipRewers/wozone.htm free ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49049 cheap propecia] [http://www.hollins.edu/ubb/Forum32/HTML/000320.html cheap nexium] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/piwyh.htm cialis online] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=250 buy soma] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=263 mp3 ringtones] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/BillKukin cheap tramadol] [http://ist.greenville.edu/drupal/files/xuxuw.html cheap phentermine] [http://dcc.syr.edu/dforum/message.asp?MessageID=49059 free funny ringtones] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/zupu.htm nexium online] [http://www.hollins.edu/ubb/Forum32/HTML/000316.html wellbutrin online] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/runuz.htm order adipex] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=23 cheap cialis] [http://ist.greenville.edu/drupal/files/rire.html ultram online] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/hulupeg.htm alltel ringtones] [http://grid.unimelb.edu.au/twiki/pub/Main/NoriJohn/nywytew.htm free funny ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/PhillipRewers/cevo.htm free funny ringtones] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/nidexyk.htm celexa online] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/pelyvug.htm real ringtones] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/LeonPokert free free ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=33 free samsung ringtones] [http://bugzilla.internet2.edu/attachment.cgi?id=757 cheap viagra] [http://grid.unimelb.edu.au/twiki/pub/Main/JamesMiller/pusug.htm diazepam online] [http://grid.unimelb.edu.au/twiki/pub/Main/JamesMiller/byvuf.htm cheap ultram] [http://bugzilla.internet2.edu/attachment.cgi?id=758 vicodin online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=35 buy alprazolam] [http://ist.greenville.edu/drupal/files/tego.html propecia online] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=257 buy diazepam] [http://www.hollins.edu/ubb/Forum32/HTML/000364.html free mp3 ringtones] [http://bugzilla.internet2.edu/attachment.cgi?id=733 meridia online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/xyvibi.htm meridia online] [http://www.hollins.edu/ubb/Forum32/HTML/000359.html free nokia ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/lyxex.htm buy adipex] [http://ist.greenville.edu/drupal/files/huduc.html xenical online] [http://ist.greenville.edu/drupal/files/nezy.html hydrocodone] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/kyxud.htm cingular ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000375.html free sagem ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000286.html xanax online] [http://www.hollins.edu/ubb/Forum32/HTML/000338.html cheap lisinopril] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/wybuk.htm free funny ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=48909 order valium] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=51 free tracfone ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/PhillipRewers/gotu.htm samsung ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49020 cheap ativan] [http://www.hollins.edu/ubb/Forum32/HTML/000386.html free kyocera ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=19 online xanax] [http://grid.unimelb.edu.au/twiki/pub/Main/NoriJohn/xehepoc.htm free mp3 ringtones] [http://ist.greenville.edu/drupal/files/gogo.html cheap tramadol] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=32 motorola ringtones] [http://ist.greenville.edu/drupal/files/typutu.html samsung ringtones] [http://grid.unimelb.edu.au/twiki/pub/Main/JackLawson/fuju.htm buy adipex] [http://dcc.syr.edu/dforum/message.asp?MessageID=49040 cheap xenical] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/vyxypu.htm cheap pharmacy online] [http://www.hollins.edu/ubb/Forum32/HTML/000367.html real ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/tirev.htm vicodin online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/gogy.htm ultram online] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/woty.htm cheap didrex] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=16 online valium] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=258 buy cialis] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=252 cheap phentermine] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BettySmith/bogo.htm cheap prozac] [http://bugzilla.internet2.edu/attachment.cgi?id=728 free cingular ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000378.html mono ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000297.html alprazolam online] [http://www.hollins.edu/ubb/Forum32/HTML/000355.html order hoodia] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/widokyj.htm xanax online] [http://www.hollins.edu/ubb/Forum32/HTML/000373.html polyphonic ringtones] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/jotu.htm lorazepam online] [http://www.hollins.edu/ubb/Forum32/HTML/000366.html free qwest ringtones] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/tytugok.htm buy diethylpropion] [http://ist.greenville.edu/drupal/files/wywe.html didrex online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/toro.htm cheap norco] [http://ist.greenville.edu/drupal/files/sodere.html cheap viagra] [http://dcc.syr.edu/dforum/message.asp?MessageID=49042 buy wellbutrin] [http://www.hollins.edu/ubb/Forum32/HTML/000385.html free wwe ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BettySmith/pybido.htm lisinopril online] [http://bugzilla.internet2.edu/attachment.cgi?id=734 mono ringtones] [http://grid.unimelb.edu.au/twiki/pub/Main/NoriJohn/woco.htm free nokia ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000379.html free alltel ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49069 music ringtones] [http://bugzilla.internet2.edu/attachment.cgi?id=745 free real ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/liko.htm tramadol online] [http://ist.greenville.edu/drupal/files/potyke.html but ambien] [http://bugzilla.internet2.edu/attachment.cgi?id=739 nokia ringtones] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=265 free qwest ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000287.html fioricet] [http://dcc.syr.edu/dforum/message.asp?MessageID=49038 cheap lorazepam] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/AlexandrMumer diazepam online] [http://www.hollins.edu/ubb/Forum32/HTML/000381.html cool ringtones] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/xuropys.htm cheap meridia] [http://dcc.syr.edu/dforum/message.asp?MessageID=49062 nextel ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000323.html cheap propecia] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/wyfyzil.htm buy carisoprodol] [http://ist.greenville.edu/drupal/files/cykekud.html wellbutrin online] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/xuvoz.htm tracfone ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49068 sprint ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000372.html verizon ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/tibyx.htm fioricet online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=48 cheap didrex] [http://ist.greenville.edu/drupal/files/lebu.html alprazolam online] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/sirid.htm cheap cyclobenzaprine] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=264 nextel ringtones] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/TimLeen cheap carisoprodol] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/PhillipRewers/gigyfy.htm free nextel ringtones] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/tezowi.htm cheap ultram] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/cytic.htm buy valium] [http://www.hollins.edu/ubb/Forum32/HTML/000387.html free sony ringtones] [http://ist.greenville.edu/drupal/files/kugidez.html cheap fioricet] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=45 cheap nexium] [http://dcc.syr.edu/dforum/message.asp?MessageID=49047 ultracet online] [http://ist.greenville.edu/drupal/files/binyc.html free ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/wedihef.htm free jazz ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/seluweg.htm hoodia online] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/SebastianGekson free mp3 ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=48955 xanax online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=46 ultracet online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=13 cheap tramadol] [http://dcc.syr.edu/dforum/message.asp?MessageID=49031 cheap levitra] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=50 free ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49080 alltel ringtones] [http://ist.greenville.edu/drupal/files/gesy.html paxil online] [http://bugzilla.internet2.edu/attachment.cgi?id=743 polyphonic ringtones] [http://bugzilla.internet2.edu/attachment.cgi?id=726 carisoprodol online] [http://ist.greenville.edu/drupal/files/ditypu.html cheap carisoprodol] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/juneb.htm sony ericsson ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/nijig.htm valium online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=39 hydrocodone online] [http://bugzilla.internet2.edu/attachment.cgi?id=737 free music ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000363.html funny ringtones] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=260 free free ringtones] [http://bugzilla.internet2.edu/attachment.cgi?id=753 tramadol online] [http://bugzilla.internet2.edu/attachment.cgi?id=727 cheap cialis] __NOTOC__
<noinclude>__NOTOC__ {{clear floats}}</noinclude>
{{TitledBox/start|heading=<noinclude>{{CatUp|Main Page}}</noinclude>{{CatItem|luaCode.png|Lua Help|Roblox Lua|Making your maps do crazy things}}}}
[http://www.lua.org Lua] ([http://www.lua.org/about.html#name '''not''' "LUA"]) is a simple programming language that is used in Roblox to add in customized content, like cars that drive, weapons, planes, random terrain, and whole games, and much more!


{{CatUp|Main Page}}
This <noinclude>page</noinclude><includeonly>section</includeonly> provides tutorials to help users to learn Lua.


{|
There are often multiple tutorials on the same subject, so if you don't understand something in one of them, try another!
|-
| valign="top" style="padding-right: 14px;" |
<div style="margin-left: 10%; margin-right: 10%;">
Lua is a versatile, interpreted programming language with a simple grammar. Because Lua can easily be embedded into applications, it is frequently used in games, such as World of Warcraft, Far Cry and Baldur's Gate.


Lua is used in Roblox by users to add in customized content, like cars that drive, new weapons, etc.
If you still don't understand something, you can ask in [https://discord.gg/CHFK7eXXMY the Roblox Client Search Discord server] or [https://discord.gg/Jfrdmx3ZwQ the Novetus launcher Discord server]. Note that you're more likely to get an answer if you ask a specific question, and that if you have a problem with a piece of code, posting the code (using [https://www.wikihow.com/Format-Text-as-Code-in-Discord multi-line formatting]) really helps people to find what the problem is. Messages just asking "How do I script?" or "Make me this" are usually ignored.


See the official [http://www.lua.org Lua website] and the [http://en.wikipedia.org/wiki/Lua_(programming_language) Wikipedia] article for more information.
{{TitledBox/subheading|Introduction series - read these first!}}
{{CatList|Script Creation Walkthrough|Script Creation Walkthrough|Creating and running scripts.}}
{{CatList|Flowcharts|Flowcharts|Using diagrams to show the "flow" of a script.}}
{{CatList|Basic math|Basic Math|Working with numbers in a script.}}
{{CatList|String|Strings|Working with text in a script.}}
{{CatList|Bool|Booleans|Working with yes/no values in a script.}}
{{CatList|Variables|Variables|How to hold data in a static reference.}}
{{CatList|Conditional statements|Conditional Statements|Making scripts do different things in different situations.}}
{{CatList|Loops|Loops|Making a piece of code run multiple times.}}
{{CatList|Functions|Functions|Wrapping code in a useful function to be called upon later in a script.}}
{{CatList|Tables|Tables|Storing multiple objects in one.}}
{{CatList|Generic for|Generic for|Using a loop to iterate through a table.}}


{{TitledBox/subheading|Other Guides}}
{{CatList|Absolute beginner's guide to scripting|Beginner's Guide to Scripting|If you've never worked with scripting before, look here.}}
{{CatList|Basic Scripting|Basic Scripting|Shows you some of the basics of scripting.}}
{{CatList|How to Script Anything|How to Script Anything|Learn the basic methods to put together any script.}}
{{CatList|In-Depth Scripting Guide|In-Depth Scripting Guide|More ways to understand the dynamics of Lua.}}
{{CatListUrl|http://www.lua.org/pil|Programming In Lua|Guide to Lua by its creators. (partly out of date)}}


==Basic Lua==
{{TitledBox/subheading|Introductions to Concepts}}
{| width=100%
{{CatList|DHTML|Using DHTML|Example of DHTML, a 2007 feature letting you display webpages during gameplay (before GUI was added in 2009).}}
|
{{CatList|Beginner's GUI Tutorial|What are GUIs?|This very in-depth guide explains what GUIs are.}}
{| cellspacing=5 cellpadding=5 border=0 width=100% style="background-color: #fdd; border: 2px dashed #f00;"
{{CatList|Introduction to Weapons|Intro to Weapons|An intro into the scripting of Weapons in Roblox.}}
{{CatList|ROBLOX Scripting How To: Data Persistence|ROBLOX Scripting How To: Data Persistence|What is data persistence?}}
{{CatList|Data Persistence Tutorial|Data Persistence Tutorial|A tutorial on understanding and using data persistence in your places.}}
{{CatList|How To Increase and Decrease Vector3 Values|Using Vector3 Values|Shows how to use math with Vector3s.}}
{{CatList|Leaderboards|Using Leaderboards|Creating your own leaderboards.}}
{{CatList|Random numbers|Random Numbers|Stopping the same thing from happening each time.}}
{{CatList|How To Make Plugins|How To Make Plugins|Shows how you can make your own Roblox Studio toolbars and buttons.}}
{{CatList|Tools|Using Tools|Creating your own tools.}}
{{CatList|HopperBins|Using HopperBins|The older version of tools, HopperBins.}}
{{CatList|String Patterns|Using String Patterns|What string patterns are and how to use them.}}


|width=48|{{CatImage || image=LuaIco2.png | link=Scripting | width=48px | height=48px }}
{{TitledBox/subheading|Reference}}
|'''[[Scripting|Basic Lua]]'''<br><small>A simple description of Lua, and how to use it.
{{CatList|Scripting|Scripting|An overview of scripting in Roblox, and a portal for in-depth articles.}}
{{CatList|Function Dump|Functions|A list of all the global functions.}}
{{CatList|Class Reference|Class Reference|All the types of Roblox [[RBX.lua.Instance (Object)|Instances]].}}
{{CatListUrl|http://www.lua.org/manual/5.1|Lua 5.1 Reference Manual|Official definition of the Lua language. (some features not available in Roblox)}}


|width=48|{{CatImage || image=LuaCode.png | link=Code Snippits | width=48px | height=48px }}
{{TitledBox/subheading|Example Scripts}}
|'''[[Code Snippits]]'''<br><small>Small bits of code that you can use in a larger script, or learn from.
{{CatList|Cookbook|Cookbook|Large list of small example scripts}}
 
{{CatList|How do I create a brick?|Creating a Brick|Basic tutorial on creating a brick using a script.}}
|width=48|{{CatImage || image=LuaCode.png | link=Full Codes | width=48px | height=48px }}
{{CatList|Debounce|IS:What is Debounce?|Explains what a debounce is, and what it's used for.}}
|'''[[Full Codes]]'''<br><small>Entire codes that have been released to be used in whatever.
{{CatList|Restricted Doors|Creating Restricted Doors|Shows how to create a door that only certain people can enter.}}
 
{{CatList|One Way Shields|One-way Doors|How to create doors that go only one direction.}}
|}
{{CatList|Teleportation|How to Teleport|An overview of teleportation of players.}}
 
{{CatList|Making an onClicked script|Making an OnClicked Script|Shows how to use the Mouse to trigger weapons.}}
 
{{CatList|Sounds|Using Sounds|Shows how to use events and work with Sounds.}}
==Function/Class reference==
{{CatList|How to add messages|How to Add Messages to Your Place|Shows how to use scripts to work with the [[RBX.lua.Message (Object)|Message]] object.}}
{| width=100%
{{CatList|How To Use BodyPosition|Using BodyPosition|Details how to use the [[RBX.lua.BodyPosition (Object)|BodyPosition]] object.}}
|
{{CatList|PlayerAdded|Using PlayerAdded|How to use the [[PlayerAdded (Event)|PlayerAdded]] event.}}
{| cellspacing=5 cellpadding=5 border=0 width=100% style="background-color: #fdd; border: 2px dashed #f00;"
{{CatList|Using the Chatted Event|How to Create Talking Commands|A guide on how to use the Chatted event.}}
 
{{CatList|How To Make Multi Handles|How to Make Multi-Handle tools|Creating tools with more than one brick for a handle.}}
|width=48|{{CatImage || image=LuaCode.png | link=Function Dump | width=48px | height=48px }}
{{CatList|How to make text on a brick|How to make text on a brick|How to make words appear above a brick.}}
|'''[[Function Dump]]'''<br><small>Most of the functions currently available in Roblox Lua.
{{CatList|How to Make Conveyor Belts|How to Make Conveyor Belts|Parts that move other parts.}}
 
{{CatList|How to Make Ramps|How to Make Ramps|Using [[CFrame]] to rotate parts.}}
|width=48|{{CatImage || image=LuaCode.png | link=Class reference | width=48px | height=48px }}
{{CatList|Terrain_Generation|Terrain Generation|Generating non-random terrain mathematically.}}
|'''[[Class reference]]'''<br><small>The main classes in Roblox Lua
{{CatList|Random_terrain|Random Terrain|Generating unique terrain randomly.}}
|}
{{TitledBox/end}}
 
==Feedback==
{| width=100%
|
{| cellspacing=5 cellpadding=5 border=0 width=100% style="background-color: #fdd; border: 2px dashed #f00;"
 
|width=48|{{CatImage || image=bug.png | link=Bug Reporting |width=48px |height=48px }}
|'''[[Bugs|Bug Reporting]]'''<br><small>Report any MAJOR bugs/errors you have encountered here
 
|width=48|{{CatImage || image=LuaIdea.png | link=Request Lua Feature |width=48px |height=48px }}
|'''[[Request Lua Feature|Request A Feature]]'''<br><small>Place your requests for new additions/binds in here. Please be realistic and not demanding.

Latest revision as of 06:13, 30 October 2023

Roblox LuaRoblox Lua
Making your maps do crazy things

Lua (not "LUA") is a simple programming language that is used in Roblox to add in customized content, like cars that drive, weapons, planes, random terrain, and whole games, and much more!

This page provides tutorials to help users to learn Lua.

There are often multiple tutorials on the same subject, so if you don't understand something in one of them, try another!

If you still don't understand something, you can ask in the Roblox Client Search Discord server or the Novetus launcher Discord server. Note that you're more likely to get an answer if you ask a specific question, and that if you have a problem with a piece of code, posting the code (using multi-line formatting) really helps people to find what the problem is. Messages just asking "How do I script?" or "Make me this" are usually ignored.

Introduction series - read these first!
Script Creation WalkthroughCreating and running scripts.
FlowchartsUsing diagrams to show the "flow" of a script.
Basic MathWorking with numbers in a script.
StringsWorking with text in a script.
BooleansWorking with yes/no values in a script.
VariablesHow to hold data in a static reference.
Conditional StatementsMaking scripts do different things in different situations.
LoopsMaking a piece of code run multiple times.
FunctionsWrapping code in a useful function to be called upon later in a script.
TablesStoring multiple objects in one.
Generic forUsing a loop to iterate through a table.
Other Guides
Beginner's Guide to ScriptingIf you've never worked with scripting before, look here.
Basic ScriptingShows you some of the basics of scripting.
How to Script AnythingLearn the basic methods to put together any script.
In-Depth Scripting GuideMore ways to understand the dynamics of Lua.
Programming In LuaGuide to Lua by its creators. (partly out of date)
Introductions to Concepts
Using DHTMLExample of DHTML, a 2007 feature letting you display webpages during gameplay (before GUI was added in 2009).
What are GUIs?This very in-depth guide explains what GUIs are.
Intro to WeaponsAn intro into the scripting of Weapons in Roblox.
Data Persistence TutorialA tutorial on understanding and using data persistence in your places.
Using Vector3 ValuesShows how to use math with Vector3s.
Using LeaderboardsCreating your own leaderboards.
Random NumbersStopping the same thing from happening each time.
How To Make PluginsShows how you can make your own Roblox Studio toolbars and buttons.
Using ToolsCreating your own tools.
Using HopperBinsThe older version of tools, HopperBins.
Using String PatternsWhat string patterns are and how to use them.
Reference
ScriptingAn overview of scripting in Roblox, and a portal for in-depth articles.
FunctionsA list of all the global functions.
Class ReferenceAll the types of Roblox Instances.
Lua 5.1 Reference ManualOfficial definition of the Lua language. (some features not available in Roblox)
Example Scripts
CookbookLarge list of small example scripts
Creating a BrickBasic tutorial on creating a brick using a script.
IS:What is Debounce?Explains what a debounce is, and what it's used for.
Creating Restricted DoorsShows how to create a door that only certain people can enter.
One-way DoorsHow to create doors that go only one direction.
How to TeleportAn overview of teleportation of players.
Making an OnClicked ScriptShows how to use the Mouse to trigger weapons.
Using SoundsShows how to use events and work with Sounds.
How to Add Messages to Your PlaceShows how to use scripts to work with the Message object.
Using BodyPositionDetails how to use the BodyPosition object.
Using PlayerAddedHow to use the PlayerAdded event.
How to Create Talking CommandsA guide on how to use the Chatted event.
How to Make Multi-Handle toolsCreating tools with more than one brick for a handle.
How to make text on a brickHow to make words appear above a brick.
How to Make Conveyor BeltsParts that move other parts.
How to Make RampsUsing CFrame to rotate parts.
Terrain GenerationGenerating non-random terrain mathematically.
Random TerrainGenerating unique terrain randomly.