User:Sncplay42/Lua Help: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Sncplay42
Manual, PiL, Cookbook
>JulienDethurens
Removed links to deleted pages.
 
(3 intermediate revisions by one other user not shown)
Line 4: Line 4:


This page provides tutorials to help users to learn Lua.
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 at [http://www.roblox.com/Forum/ShowForum.aspx?ForumID=20 Scripting Helpers]. Note that you're more likely to get an answer if you ask a specific question than something general, and that if you have a problem with a piece of code, posting the code really helps people to find what the problem is. Posts just asking "How do I script?" or "Make me this" are usually ignored.


{{TitledBox/subheading|<b style{{=}}"font-size:1.25em;">Introduction series - read these first!</b>}}
{{TitledBox/subheading|<b style{{=}}"font-size:1.25em;">Introduction series - read these first!</b>}}
Line 45: Line 49:
{{CatList|How do I create a brick?|Creating a Brick|Basic tutorial on how to create a brick using a script.}}
{{CatList|How do I create a brick?|Creating a Brick|Basic tutorial on how to create a brick using a script.}}
{{CatList|Debounce|IS:What is Debounce?|Explains what Debounce is, and what it's used for.}}
{{CatList|Debounce|IS:What is Debounce?|Explains what Debounce is, and what it's used for.}}
{{CatList|Intro to Scripting: Make a Healing Potion|Making a Healing Potion|The Intro to Scripting series, how to Heal or Damage a Humanoid.}}
{{CatList|Intro to Scripting: Make a Dance Floor|Make a Dance Floor|How to change the color of a brick, and create simple loops.}}
{{CatList|Intro to Scripting: Make an Invisibility Tool|Make an Invisibility Tool|Shows how to create Tools and turn yourself invisible.}}
{{CatList|How do I make VIP doors?|How to create VIP Doors|Shows how to use tables, and to create a door that only certain people can enter.}}
{{CatList|How do I make VIP doors?|How to create VIP Doors|Shows how to use tables, and to create a door that only certain people can enter.}}
{{CatList|How to make precipitation|How to make Rain|Creating drops falling from the sky in random locations.}}
{{CatList|One Way Shields|One-way Doors|How to create doors that go only one direction.}}
{{CatList|One Way Shields|One-way Doors|How to create doors that go only one direction.}}
{{CatList|How To Make Glow Scripts|Making Glow Scripts|Making objects glow, with more complex loops.}}
{{CatList|Teleportation|How to Teleport|An overview of teleportation of players.}}
{{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|Making an onClicked script|Making an OnClicked Script|Shows how to use the Mouse to trigger weapons.}}
{{CatList|How to Make a Model Regenerate|How to make Regenerateable Models|Shows how to use variables to remove and create new models, even if they've been destroyed.}}
{{CatList|Sounds|Using Sounds|Shows how to use events and work with Sounds.}}
{{CatList|Sounds|Using Sounds|Shows how to use events and work with Sounds.}}
{{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.}}
{{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.}}
{{CatList|How To Use BodyPosition|Using BodyPosition|Details how to use the [[RBX.lua.BodyPosition (Object)|BodyPosition]] object.}}
{{CatList|How To Use BodyPosition|Using BodyPosition|Details how to use the [[RBX.lua.BodyPosition (Object)|BodyPosition]] object.}}
{{CatList|How To Build A Catapult|How to build a Catapult|A guide for medieval mayhem.}}
{{CatList|PlayerAdded|Using PlayerAdded|How to use the [[PlayerAdded (Event)|PlayerAdded]] event.}}
{{CatList|PlayerAdded|Using PlayerAdded|How to use the [[PlayerAdded (Event)|PlayerAdded]] event.}}
{{CatList|Using the Chatted Event|How to create talking commands|A guide on how to use the Chatted event.}}
{{CatList|Using the Chatted Event|How to create talking commands|A guide on how to use the Chatted event.}}
{{CatList|How To Make an Elevator|How to make an Elevator|How to make bricks move up and down in time.}}
{{CatList|How Do I Make Morphs?|How to make Morphs|Creating Morphs for your players.}}
{{CatList|How To Make Multi Handles|How to make Multi-Handle tools|Creating tools with more than one brick for a handle.}}
{{CatList|How To Make Multi Handles|How to make Multi-Handle tools|Creating tools with more than one brick for a handle.}}
{{CatList|Money/Shop Scripts|Money and Shop Scripts|How to create an economy for your place.}}
{{CatList|How to Create a Black Hole|Creating Black Holes|Shows how to simulate gravity fields in lots of objects.}}
{{CatList|How to make text on a brick|How to make text on a brick|How to make words appear above a brick.}}
{{CatList|How to make text on a brick|How to make text on a brick|How to make words appear above a brick.}}
{{CatList|Teleportation|Teleportation|How to move characters to different positions.}}
{{CatList|Teleportation|Teleportation|How to move characters to different positions.}}
{{CatList|How to Make Weapon Giving Teleporters|How to Make Weapon Giving Teleporters|Moving characters and giving them weapons.}}
{{CatList|How to Make Conveyor Belts|How to Make Conveyor Belts|Parts that move other parts.}}
{{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.}}
{{CatList|How to Make Ramps|How to Make Ramps|Using [[CFrame]] to rotate parts.}}
{{CatList|How to make lava|How to Make Lava|Parts that hurt characters when touched.}}
{{CatList|How to make circles|How to make circles|Using [[CFrame]] to arrange parts in a circle.}}
{{CatList|How to make circles|How to make circles|Using [[CFrame]] to arrange parts in a circle.}}
{{CatList|How to make a spiral staircase|How to make a spiral staircase|Using [[CFrame]] to arrange parts in a spiral.}}
{{TitledBox/end}}
{{TitledBox/end}}

Latest revision as of 01:33, 6 May 2012

Roblox LuaRoblox Lua
Making your maps do crazy things

Lua is a simple programming language that is used in Roblox to add in customized content, like cars that drive, new weapons, etc.

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 at Scripting Helpers. Note that you're more likely to get an answer if you ask a specific question than something general, and that if you have a problem with a piece of code, posting the code really helps people to find what the problem is. Posts just asking "How do I script?" or "Make me this" are usually ignored.

Introduction series - read these first!
Script Creation WalkthroughHow to create and run scripts.
FlowchartsUsing diagrams to show the "flow" of a script.
Basic mathHow to work with numbers in a script.
StringsHow to work with text in a script.
BooleansHow to work with yes/no values in a script.
Conditional statementsHow to make scripts do different things in different situations.
LoopsHow to make a piece of code run multple times.
TablesStoring multiple objects in one.
Generic forA special kind of loop for tables.
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.
Programming In LuaGuide to Lua by its creators. (partly out of date)
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 Persistence TutorialA tutorial on understanding and using data persistence in your places.
Using Vector3 ValuesShows how to use math with Vector3s.
Using LeaderboardsHow to create your own Leaderboards.
Random numbersHow to stop the same thing happening each time.
Reference
FunctionsA list of all the global (don't need an object) functions.
Class ReferenceAll the types of Roblox Instances.
Built-in functionsFunctions available in every Instance.
Lua Reference ManualOfficial documentation of Lua. (some features not available in Roblox)
Example Scripts
CookbookLarge list of small example scripts
Creating a BrickBasic tutorial on how to create a brick using a script.
IS:What is Debounce?Explains what Debounce is, and what it's used for.
How to create VIP DoorsShows how to use tables, and 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.
TeleportationHow to move characters to different positions.
How to Make Conveyor BeltsParts that move other parts.
How to Make RampsUsing CFrame to rotate parts.
How to make circlesUsing CFrame to arrange parts in a circle.