Tutorial page
This article is an easy tutorial.
All tutorials · Scripting tutorials
Scripting
This page is a tutorial about Scripting.
The cookbook is a book to teach new users to program on Roblox. See Chapter 0 for more information.
Table of Contents
- Chapter 0 – About & Preparing Studio
- Chapter 1 – Terminology
- Chapter 2 - Newbie's Guide
- Chapter 3 - Beginner's Scripting Guide
- Chapter 4 - Intermediate Scripting Guide
- Chapter 5 - Advanced Scripting Guide
- Chapter 6 - Expert Scripting Guide
- Chapter 7 - Advanced GUI Tutorial
Concepts Covered
Below are the main concepts covered in some of the chapters.
Newbie's Tutorial
- The Home Tab contains several tools to insert and manipulate shapes.
- Three-dimensional shapes in Roblox are called parts, and you can modify its shape, size, colour, texture and name.
- A script contains the code.
- The Explorer window is the list of all the objects in the game, and it has a hierarchal structure.
- To create a path to an instance, you start with the word game then work your way down the hierarchy.
- In the Explorer window's hierarchy, a parent is one step above its child.
- A complete statement must perform an action to an instance.
Beginners Tutorial
- The properties of an object determine its visible characteristics.
- The output window is the primary tool for fixing coding errors.
- A variable is a piece of text representing numbers, text, booleans or instances.
- Variables can be declared, updated and accessed.
- The .new() constructor creates a new value for certain properties.
- Vector3 is a value type that determine the coordinates of an object in a three-dimensional space.
- A function is a piece of code that can be used multiple times.
Intermediate Tutorial
- An if statement performs an action if a condition is met.
- If statements can be nested and paired with else and elseif statements.
- A service is an instance of the highest hierarchal level in the Explorer Window.
- A function can be paired with parameters, and multiple parameters are called tuples.
- Functions can return values in the form of variables.
- An event is an action that the scripts detects and reacts to by firing a function.
- Many instances have built-in functions for the scripter to use.
- A table is an array of values wrapped by curly brackets {}.
- A loop executes code multiple times.
- Scripts are indented according to its blocks.
Advanced Tutorial
- A value is an instance that acts like a variable.
- Tables can be used to form the player leaderboard.
- ClickDetectors detect a mouse click on a desktop or a tap on mobile devices.
- Enum is a type of value that is from a given list of values.
- A ScreenGUI is a two-dimensional banner that appears on the screen.
- Roblox uses a client-server model, where users each have clients that are all managed by a server.
- Local scripts perform actions only on the client side.
- Remote events and functions allow client-sided actions to be replicated to the server side and vice versa.
- A CFrame contains 12 numbers, three for position and nine for orientation.
- Orientation values are expressed as radians rather than degrees.
- Player progress in games are saved with DataStoreService.
- Debugging requires the use of several techniques, and output messages take various forms.
Expert Tutorial
- Tick is a function that finds the Unix time.
- Tweening and linear interpolation are two methods of animating a part's properties.
- UDim2 is the GUI equivalent of Vector3. It takes in four values: X Scale, X Offset, Y Scale and Y Offset.
- The player's camera can be manipulated using the Camera instance in the Workspace.
- UserInputService is a service that detects when a certain key is pressed.
- Players can be given tools in the game.
- MarketplaceService is the service that manages gamepasses.
- Animations are ways to make humanoid characters move.
- TeleportService transports players from one place to another.
- A region is a specific piece of 3D space.
- Threads can allow scripts to run multiple pieces of code simultaneously.
| Scripting (44) |
| ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| GUI (8) |
| ||||||||||
| Building (3) |
| ||||||||||
| Platform (8) |
| ||||||||||