Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A list of tutorials and references so you can learn Roblox Lua

Roblox Scripting Guide

Written by Greenman#0001

The Roblox Wiki is one of the best ways to learn how to script but unfortunately, all of the tutorials on there have been scrambled due to the redesign so this guide is just sorting out the tutorials again so you can read them in the correct order. This guide should cover everything you need to become competent or at least confident with Roblox Lua.

Disclaimer

This will not guarantee that you will learn Lua quickly or even at all. It's your responsibility to use the resources here effectively by taking your time, taking notes, practicing, etc. This list will be updated as I find articles on important concepts that I overlooked so make sure you check back frequently.

Roblox Studio

Roblox Lua Scripting

User Interface

Lua Libraries

These libraries allow you to do stuff to values of a certain datatype (math = numbers, table = tables, and string = strings).

Examples:

  • You can use math to get the absolute value of a number (math.abs)
  • You can use table to sort an array (table.sort)
  • You can use string to replace parts of a string (string.gsub)

References

Roblox Datatypes Reference

This reference is good for learning how to construct these Roblox datatypes, what properties they have, and when they are used.

Example: You can use the Vector3 type to position a part

Enum Index

This reference is good when you want to see what enumerators are available for what you need.

Example: You can use Enum.KeyCode.W to get the key code for the w key. This could be used to check if the key is being pressed down.

API Reference (Class Index)

This reference is good for learning about the properties, functions/methods, and events that a class has.

Example: The Model class has a BreakJoints method that will remove all of the welds of the model.

Lua Global Function Reference

This reference is good for learning how to use some of the global functions of Lua. Some of the functions in here have been removed in Roblox Lua for security reasons (the io library and a majority of the debug library are the main ones).

Example: The tostring function will take whatever is passed in and convert it to a string.

@ViniDalvino

This comment has been minimized.

Copy link

@ViniDalvino ViniDalvino commented Mar 2, 2020

Thank you for writing these guide. I am sure this will be helpful.

@DeveloperRickSanchez

This comment has been minimized.

Copy link

@DeveloperRickSanchez DeveloperRickSanchez commented Apr 28, 2020

Thank you for these guides. Hopefully I can script.

@FunniestGuy

This comment has been minimized.

Copy link

@FunniestGuy FunniestGuy commented Mar 25, 2021

time to make 30 ripoffs of of popular franchises!!!

@FunniestGuy

This comment has been minimized.

Copy link

@FunniestGuy FunniestGuy commented Mar 25, 2021

scratch that im making poop yourself simulator thanks anyways

@ViniDalvino

This comment has been minimized.

Copy link

@ViniDalvino ViniDalvino commented Mar 25, 2021

Thanks for your idea. I’m going to make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment