Lua Help

Roblox LuaRoblox Lua
Making your maps do crazy things

This page provides tutorials to help users to learn Lua, the programming language that extends ROBLOX's API and the primary way interaction is programmed into ROBLOX games. Scripting requires dedication, discipline, and lots of hard and long thinking. With practice and experimentation, you will find yourself learning how to program anything. Besides some small technical things, very few things are out of reach when it comes to programming.

The articles below offer a way for you to learn about a new subject by doing, walking you through each step. It's important that for each tutorial or article you read, you use the information to add something unique to a game you are making.

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 as one variable.
Generic forUsing a loop to iterate through a table.
Other Lua 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. (Online version slightly out of date but still usable)
Introductions to Concepts
What are GUIs?This very in-depth guide explains what GUIs are.
Intro to WeaponsAn intro into the scripting of Weapons in Roblox.
Data PersistenceWhat is data persistence?
Data Persistence TutorialA tutorial on understanding and using data persistence in your places.
Using Vector3 ValuesShows how to use math with Vector3s.
LeaderboardsCreating your own leaderboards.
Random NumbersStopping the same thing from happening each time.
PluginsShows how you can make your own Roblox Studio toolbars and buttons.
ToolsCreating your own tools.
HopperBinsThe older version of tools, HopperBins.
Using String PatternsWhat string patterns are and how to use them.
EventsHow to use Roblox events.
What is Debounce?Explains what a debounce is, and what it's used for.
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)
Roblox LibrariesAn explanation of and reference to Roblox Libraries.
Examples and Other Roblox Guides
CookbookLarge list of small example scripts
Creating a BrickBasic tutorial on creating a brick using a script.
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.
Controlling the CameraUsing the Camera object to create effects.
GUI collision detectionUnderstanding how to detect collisions between GUIs.
Dialog Shop TutorialCreate a Dialog Shop.
Controlling a Player's CharacterLearn how to control a player!
How to use a SelectionBoxSome more information on how to use SelectionBoxes.
How to edit scripts with another scriptEdit and create scripts with a source specified using this method!