Cookbook: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Emess
→‎Preface: wiki.roblox.com/Roblox isn't an external link
>JulienDethurens
→‎Table of Contents: Nobody likes ugly underscores. Let's replace them by spaces! :D
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__TOC__
__TOC__
==RBX.Lua Cookbook==
==Author==
===Author===
The entire cookbook was written by [[Camoy]].
The entire cookbook was written by [[Camoy]].


===Preface===
==Preface==
The RBX framework for Lua provides an API (Application Programming Interface) for creating 3D games for the ROBLOX game.  The API has a vast variety of functionality such as functions for moving in game players to properties controlling custom in game GUI.  The API is easy to use and is quite powerful.  This book will cover the basics of the framework and what you will need in order to start programming your own ROBLOX games.
The RBX framework for Lua provides an <abbr title="Application Programming Interface">API</abbr> for creating 3D games for the ROBLOX game.  The API has a vast variety of functionality such as functions for moving in game players to properties controlling custom in game <abbr title="Graphic User Interface">GUI</abbr>s.  The API is easy to use and is quite powerful.  This book will cover the basics of the framework and what you will need in order to start programming your own ROBLOX games.


Getting started is easy, just head on over to the [http://www.roblox.com/Install/Download.aspx download page] in order to download the ROBLOX IDE (called Roblox Studio), and the browsing client.
Getting started is easy, just head on over to the [http://www.roblox.com/Install/Download.aspx download page] in order to download the ROBLOX <abbr title="Integrated Development Environment">IDE</abbr> (called Roblox Studio), and the browsing client.


This book assumes a prerequisite knowledge of Lua, however if you do not know Lua at all, don’t turn this book away yet.  There are many good resources in learning Lua (one especially helpful resource is [http://www.lua.org/pil/ here]).  Even if you have no prior knowledge to Lua, in the early chapters, simple Lua syntax will be explained.
This book assumes a prerequisite knowledge of Lua, however if you do not know Lua at all, don’t turn this book away yet.  There are many good resources in learning Lua (one especially helpful resource is [http://www.lua.org/pil/ here]).  Even if you have no prior knowledge to Lua, in the early chapters, simple Lua syntax will be explained.
Line 15: Line 14:
In general, this book will provide solutions and examples of many types of problems you may need to solve when building a ROBLOX game.  The difficulty level progresses as the book progresses.  It is suggested that you read the book cover to back, however if there a certain solution that you need, feel free to jump to it.
In general, this book will provide solutions and examples of many types of problems you may need to solve when building a ROBLOX game.  The difficulty level progresses as the book progresses.  It is suggested that you read the book cover to back, however if there a certain solution that you need, feel free to jump to it.


===Table of Contents===
==Table of Contents==
*[[Cookbook_(Chapter 1)|Basics]]<br />
#[[Cookbook (Chapter 1)|Basics]]
**[[Cookbook_(Chapter_1)#Part_Instantiation|1.0        Part Instantiation]]<br />
##[[Cookbook (Chapter 1)#Part Instantiation|Part Instantiation]]
**[[Cookbook_(Chapter_1)#Color_and_Transparency|1.1        Color and Transparency]]<br />
##[[Cookbook (Chapter 1)#Color and Transparency|Color and Transparency]]
**[[Cookbook_(Chapter_1)#Applying_the_Touched_Event|1.2        Applying the Touched Event]]<br />
##[[Cookbook (Chapter 1)#Applying the Touched Event|Applying the Touched Event]]
**[[Cookbook_(Chapter_1)#Killing_Players|1.3        Killing Players]]<br />
##[[Cookbook (Chapter 1)#Killing Players|Killing Players]]
**[[Cookbook_(Chapter_1)#Removing_Limbs|1.4        Removing Limbs]]<br />
##[[Cookbook (Chapter 1)#Removing Limbs|Removing Limbs]]
**[[Cookbook_(Chapter_1)#Handling_Non-Existent_Objects|1.5        Handling Non-Existent Objects]]<br />
##[[Cookbook (Chapter 1)#Handling Non-Existent Objects|Handling Non-Existent Objects]]
**[[Cookbook_(Chapter_1)#Creating_a_Kill_Brick|1.6        Creating a Kill Brick]]<br />
##[[Cookbook (Chapter 1)#Creating a Kill Brick|Creating a Kill Brick]]
**[[Cookbook_(Chapter_1)#Removing_Multiple_Limbs|1.7        Removing Multiple Limbs]]<br />
##[[Cookbook (Chapter 1)#Removing Multiple Limbs|Removing Multiple Limbs]]
**[[Cookbook_(Chapter_1)#Removing_All_Character_Parts|1.8        Removing All Character Parts]]<br />
##[[Cookbook (Chapter 1)#Removing All Character Parts|Removing All Character Parts]]
**[[Cookbook_(Chapter_1)#Killing_All_Players|1.9        Killing All Players]]<br />
##[[Cookbook (Chapter 1)#Killing All Players|Killing All Players]]
**[[Cookbook_(Chapter_1)#Killing_Random_Players_on_Interval|1.10        Killing Random Players on Interval]]<br />
##[[Cookbook (Chapter 1)#Killing Random Players on Interval|Killing Random Players on Interval]]
**[[Cookbook_(Chapter_1)#Using_an_Exception_Table|1.11        Using an Exception Table]]<br />
##[[Cookbook (Chapter 1)#Using an Exception Table|Using an Exception Table]]
**[[Cookbook_(Chapter_1)#Killing_Spawning_Characters|1.12        Killing Spawning Characters]]<br />
##[[Cookbook (Chapter 1)#Killing Spawning Characters|Killing Spawning Characters]]
**[[Cookbook_(Chapter_1)#Creating_a_Message|1.13        Creating a Message]]<br />
##[[Cookbook (Chapter 1)#Creating a Message|Creating a Message]]
**[[Cookbook_(Chapter_1)#Debounce|1.14        Debounce]]<br />
##[[Cookbook (Chapter 1)#Debounce|Debounce]]
**[[Cookbook_(Chapter_1)#Creating_a_Clickable_Part|1.15        Creating a Clickable Part]]<br />
##[[Cookbook (Chapter 1)#Creating a Clickable Part|Creating a Clickable Part]]
**[[Cookbook_(Chapter_1)#Touch_Activated_Explosion|1.16        Touch Activated Explosion]]<br />
##[[Cookbook (Chapter 1)#Touch Activated Explosion|Touch Activated Explosion]]
**[[Cookbook_(Chapter_1)#Dance_Floor|1.17        Dance Floor]]<br />
##[[Cookbook (Chapter 1)#Dance Floor|Dance Floor]]
**[[Cookbook_(Chapter_1)#Creating_a_Healing_Part|1.18        Creating a Healing Part]]<br />
##[[Cookbook (Chapter 1)#Creating a Healing Part|Creating a Healing Part]]
**[[Cookbook_(Chapter_1)#Creating_a_Restricted_Access_Door|1.19        Creating a Restricted Access Door]]<br />
##[[Cookbook (Chapter 1)#Creating a Restricted Access Door|Creating a Restricted Access Door]]
**[[Cookbook_(Chapter_1)#Creating_an_Invisibility_Part|1.20        Creating an Invisibility Part]]<br />
##[[Cookbook (Chapter 1)#Creating an Invisibility Part|Creating an Invisibility Part]]
*[[Cookbook_(Chapter 2)|Positioning]]<br />
#[[Cookbook (Chapter 2)|Positioning]]
**[[Cookbook_(Chapter_2)#Positioning_Types|2.0        Positioning Types]]<br />
##[[Cookbook (Chapter 2)#Positioning Types|Positioning Types]]
**[[Cookbook_(Chapter_2)#Simple_Part_Positioning|2.1        Simple Part Positioning]]<br />
##[[Cookbook (Chapter 2)#Simple Part Positioning|Simple Part Positioning]]
**[[Cookbook_(Chapter_2)#Overlapping_Positioning|2.2        Overlapping Positioning]]<br />
##[[Cookbook (Chapter 2)#Overlapping Positioning|Overlapping Positioning]]
**[[Cookbook_(Chapter_2)#Simple_CFrame_Positioning|2.3        Simple CFrame Positioning]]<br />
##[[Cookbook (Chapter 2)#Simple CFrame Positioning|Simple CFrame Positioning]]
**[[Cookbook_(Chapter_2)#Rotating_Toward_Another_Position|2.4        Rotating Toward Another Position]]<br />
##[[Cookbook (Chapter 2)#Rotating Toward Another Position|Rotating Toward Another Position]]
**[[Cookbook_(Chapter_2)#Rotating_in_Radians|2.5        Rotating in Radians]]<br />
##[[Cookbook (Chapter 2)#Rotating in Radians|Rotating in Radians]]
**[[Cookbook_(Chapter_2)#Rotating_in_Degrees|2.6        Rotating in Degrees]]<br />
##[[Cookbook (Chapter 2)#Rotating in Degrees|Rotating in Degrees]]
**[[Cookbook_(Chapter_2)#Relative_Positioning|2.7        Relative Positioning]]<br />
##[[Cookbook (Chapter 2)#Relative Positioning|Relative Positioning]]
**[[Cookbook_(Chapter_2)#Getting_Relative_Position|2.8        Getting Relative Position]]<br />
##[[Cookbook (Chapter 2)#Getting Relative Position|Getting Relative Position]]
**[[Cookbook_(Chapter_2)#Using_the_Rotational_Matrix|2.9        Using the Rotational Matrix]]<br />
##[[Cookbook (Chapter 2)#Using the Rotational Matrix|Using the Rotational Matrix]]
**[[Cookbook_(Chapter_2)#Using_Lerp|2.10        Using Lerp]]<br />
##[[Cookbook (Chapter 2)#Using Lerp|Using Lerp]]
**[[Cookbook_(Chapter_2)#Simple_GUI_Positioning|2.11        Simple GUI Positioning]]<br />
##[[Cookbook (Chapter 2)#Simple GUI Positioning|Simple GUI Positioning]]
**[[Cookbook_(Chapter_2)#Centering_GUI|2.12        Centering GUI]]<br />
##[[Cookbook (Chapter 2)#Centering GUI|Centering GUI]]
*[[Cookbook_(Chapter 3)|GUI]]<br />
#[[Cookbook (Chapter 3)|GUI]]
**[[Cookbook_(Chapter_3)#Introduction|3.0        Introduction]]<br />
##[[Cookbook (Chapter 3)#Introduction|Introduction]]
**[[Cookbook_(Chapter_3)#Text_Label_Instantiation|3.1        Text Label Instantiation]]<br />
##[[Cookbook (Chapter 3)#Text Label Instantiation|Text Label Instantiation]]
**[[Cookbook_(Chapter_3)#Text_Style|3.2        Text Style]]<br />
##[[Cookbook (Chapter 3)#Text Style|Text Style]]
**[[Cookbook_(Chapter_3)#Frame_Styling|3.3        Frame Styling]]<br />
##[[Cookbook (Chapter 3)#Frame Styling|Frame Styling]]
**[[Cookbook_(Chapter_3)#Image_Instantiation|3.4        Image Instantiation]]<br />
##[[Cookbook (Chapter 3)#Image Instantiation|Image Instantiation]]
**[[Cookbook_(Chapter_3)#Creating_a_Button|3.5        Creating a Button]]<br />
##[[Cookbook (Chapter 3)#Creating a Button|Creating a Button]]
**[[Cookbook_(Chapter_3)#Creating_a_Fading_GUI|3.6        Creating a Fading GUI]]<br />
##[[Cookbook (Chapter 3)#Creating a Fading GUI|Creating a Fading GUI]]
**[[Cookbook_(Chapter_3)#Text_Box_Input|3.7        Text Box Input]]<br />
##[[Cookbook (Chapter 3)#Text Box Input|Text Box Input]]
**[[Cookbook_(Chapter_3)#Using_Adornment_GUI|3.8        Using Adornment GUI]]<br />
##[[Cookbook (Chapter 3)#Using Adornment GUI|Using Adornment GUI]]
**[[Cookbook_(Chapter_3)#Creating_a_Resize_GUI|3.9        Creating a Resize GUI]]<br />
##[[Cookbook (Chapter 3)#Creating a Resize GUI|Creating a Resize GUI]]
**[[Cookbook_(Chapter_3)#Creating_Custom_3D_GUI|3.10        Creating Custom 3D GUI]]<br />
##[[Cookbook (Chapter 3)#Creating Custom 3D GUI|Creating Custom 3D GUI]]
*[[Cookbook_(Chapter 4)|Beyond the Basics]]<br />
#[[Cookbook (Chapter 4)|Beyond the Basics]]
**[[Cookbook_(Chapter_4)#Using_BrickColor|4.0        Using BrickColor]]<br />
##[[Cookbook (Chapter 4)#Using BrickColor|Using BrickColor]]
**[[Cookbook_(Chapter_4)#Using_Color3|4.1        Using Color3]]<br />
##[[Cookbook (Chapter 4)#Using Color3|Using Color3]]
**[[Cookbook_(Chapter_4)#Using_Base_Classes|4.2        Using Base Classes]]<br />
##[[Cookbook (Chapter 4)#Using Base Classes|Using Base Classes]]
**[[Cookbook_(Chapter_4)#Using_Enumerations|4.3        Using Enumerations]]<br />
##[[Cookbook (Chapter 4)#Using Enumerations|Using Enumerations]]
**[[Cookbook_(Chapter_4)#Event_Members|4.4        Event Members]]<br />
##[[Cookbook (Chapter 4)#Event Members|Event Members]]
**[[Cookbook_(Chapter_4)#Disconnecting_a_Connection|4.5        Disconnecting a Connection]]<br />
##[[Cookbook (Chapter 4)#Disconnecting a Connection|Disconnecting a Connection]]
**[[Cookbook_(Chapter_4)#Using_LocalScripts|4.6        Using LocalScripts]]<br />
##[[Cookbook (Chapter 4)#Using LocalScripts|Using LocalScripts]]
**[[Cookbook_(Chapter_4)#Creating_a_Regeneration_Button|4.7        Creating a Regeneration Button]]<br />
##[[Cookbook (Chapter 4)#Creating a Regeneration Button|Creating a Regeneration Button]]
**[[Cookbook_(Chapter_4)#Creating_a_Template|4.8        Creating a Template]]<br />
##[[Cookbook (Chapter 4)#Creating a Template|Creating a Template]]
**[[Cookbook_(Chapter_4)#Creating_a_Leaderboard|4.9        Creating a Leaderboard]]<br />
##[[Cookbook (Chapter 4)#Creating a Leaderboard|Creating a Leaderboard]]
**[[Cookbook_(Chapter_4)#Creating_a_Point_Earning_Button|4.10        Creating a Point Earning Button]]<br />
##[[Cookbook (Chapter 4)#Creating a Point Earning Button|Creating a Point Earning Button]]
**[[Cookbook_(Chapter_4)#Applying_the_Chatted_Event|4.11        Applying the Chatted Event]]<br />
##[[Cookbook (Chapter 4)#Applying the Chatted Event|Applying the Chatted Event]]
**[[Cookbook_(Chapter_4)#Applying_the_Changed_Event|4.12        Applying the Changed Event]]<br />
##[[Cookbook (Chapter 4)#Applying the Changed Event|Applying the Changed Event]]
**[[Cookbook_(Chapter_4)#Applying_the_ChildAdded/Removing_Event|4.13        Applying the ChildAdded/Removing Event]]<br />
##[[Cookbook (Chapter 4)#Applying the ChildAdded/Removing Event|Applying the ChildAdded/Removing Event]]
**[[Cookbook_(Chapter_4)#Descendants|4.14        Descendants]]<br />
##[[Cookbook (Chapter 4)#Descendants|Descendants]]
**[[Cookbook_(Chapter_4)#Creating_a_Marquee|4.15        Creating a Marquee]]<br />
##[[Cookbook (Chapter 4)#Creating a Marquee|Creating a Marquee]]
**[[Cookbook_(Chapter_4)#Using_a_SpecialMesh|4.16        Using a SpecialMesh]]<br />
##[[Cookbook (Chapter 4)#Using a SpecialMesh|Using a SpecialMesh]]
**[[Cookbook_(Chapter_4)#Using_a_VehicleSeat|4.17        Using a VehicleSeat]]<br />
##[[Cookbook (Chapter 4)#Using a VehicleSeat|Using a VehicleSeat]]
**[[Cookbook_(Chapter_4)#Using_Fire|4.18        Using Fire]]<br />
##[[Cookbook (Chapter 4)#Using Fire|Using Fire]]
*[[Cookbook_(Chapter 5)|Tools and HopperBins]]<br />
#[[Cookbook (Chapter 5)|Tools and HopperBins]]
**[[Cookbook_(Chapter_5)#Introduction|5.0        Introduction]]<br />
##[[Cookbook (Chapter 5)#Introduction|Introduction]]
**[[Cookbook_(Chapter_5)#Creating_a_Reset|5.1        Creating a Reset]]<br />
##[[Cookbook (Chapter 5)#Creating a Reset|Creating a Reset]]
**[[Cookbook_(Chapter_5)#Kill_Tool|5.2        Kill Tool]]<br />
##[[Cookbook (Chapter 5)#Kill Tool|Kill Tool]]
**[[Cookbook_(Chapter_5)#Key_Controls|5.3        Key Controls]]<br />
##[[Cookbook (Chapter 5)#Key Controls|Key Controls]]
**[[Cookbook_(Chapter_5)#Creating_a_Sword|5.4        Creating a Sword]]<br />
##[[Cookbook (Chapter 5)#Creating a Sword|Creating a Sword]]
**[[Cookbook_(Chapter_5)#Creating_a_Kick_Tool|5.5        Creating a Kick Tool]]<br />
##[[Cookbook (Chapter 5)#Creating a Kick Tool|Creating a Kick Tool]]
**[[Cookbook_(Chapter_5)#StarterGear|5.6        StarterGear]]<br />
##[[Cookbook (Chapter 5)#StarterGear|StarterGear]]
*[[Cookbook_(Chapter 6)|Service Level]]<br />
#[[Cookbook (Chapter 6)|Service Level]]
**[[Cookbook_(Chapter_6)#Introduction|6.0        Introduction]]<br />
##[[Cookbook (Chapter 6)#Introduction|Introduction]]
**[[Cookbook_(Chapter_6)#Using_GetService|6.1        Using GetService]]<br />
##[[Cookbook (Chapter 6)#Using GetService|Using GetService]]
**[[Cookbook_(Chapter_6)#Getting_Server_Time|6.2        Getting Server Time]]<br />
##[[Cookbook (Chapter 6)#Getting Server Time|Getting Server Time]]
**[[Cookbook_(Chapter_6)#Using_Lighting|6.3        Using Lighting]]<br />
##[[Cookbook (Chapter 6)#Using Lighting|Using Lighting]]
**[[Cookbook_(Chapter_6)#Awarding_Badges|6.4        Awarding Badges]]<br />
##[[Cookbook (Chapter 6)#Awarding Badges|Awarding Badges]]
**[[Cookbook_(Chapter_6)#Creator_Badge|6.5        Creator Badge]]<br />
##[[Cookbook (Chapter 6)#Creator Badge|Creator Badge]]
**[[Cookbook_(Chapter_6)#Inserting_Assets|6.6        Inserting Assets]]<br />
##[[Cookbook (Chapter 6)#Inserting Assets|Inserting Assets]]
**[[Cookbook_(Chapter_6)#Retrieving_IPs|6.7        Retrieving IPs]]<br />
##[[Cookbook (Chapter 6)#Retrieving IPs|Retrieving IPs]]
**[[Cookbook_(Chapter_6)#Setting_Maximum_Players|6.8        Setting Maximum Players]]<br />
##[[Cookbook (Chapter 6)#Setting Maximum Players|Setting Maximum Players]]
**[[Cookbook_(Chapter_6)#Using_Debris|6.9        Using Debris]]<br />
##[[Cookbook (Chapter 6)#Using Debris|Using Debris]]
*[[Cookbook_(Chapter 7)|Moving]]<br />
#[[Cookbook (Chapter 7)|Moving]]
**[[Cookbook_(Chapter_7)#Introduction|7.0        Introduction]]<br />
##[[Cookbook (Chapter 7)#Introduction|Introduction]]
**[[Cookbook_(Chapter_7)#Moving_to_a_Position|7.1        Moving to a Position]]<br />
##[[Cookbook (Chapter 7)#Moving to a Position|Moving to a Position]]
**[[Cookbook_(Chapter_7)#Moving_in_a_Direction|7.2        Moving in a Direction]]<br />
##[[Cookbook (Chapter 7)#Moving in a Direction|Moving in a Direction]]
**[[Cookbook_(Chapter_7)#Rotating_in_a_Direction|7.3        Rotating in a Direction]]<br />
##[[Cookbook (Chapter 7)#Rotating in a Direction|Rotating in a Direction]]
**[[Cookbook_(Chapter_7)#Using_BodyGyro|7.4        Using BodyGyro]]<br />
##[[Cookbook (Chapter 7)#Using BodyGyro|Using BodyGyro]]
**[[Cookbook_(Chapter_7)#Using_Dampening|7.5        Using Dampening]]<br />
##[[Cookbook (Chapter 7)#Using Dampening|Using Dampening]]
**[[Cookbook_(Chapter_7)#Using_Power|7.6        Using Power]]<br />
##[[Cookbook (Chapter 7)#Using Power|Using Power]]
**[[Cookbook_(Chapter_7)#Using_BodyForce|7.7        Using BodyForce]]<br />
##[[Cookbook (Chapter 7)#Using BodyForce|Using BodyForce]]
**[[Cookbook_(Chapter_7)#Using_BodyThrust|7.8        Using BodyThrust]]<br />
##[[Cookbook (Chapter 7)#Using BodyThrust|Using BodyThrust]]
**[[Cookbook_(Chapter_7)#Simple_Welding|7.9        Simple Welding]]<br />
##[[Cookbook (Chapter 7)#Simple Welding|Simple Welding]]
**[[Cookbook_(Chapter_7)#Weld_Offset|7.10        Weld Offset]]<br />
##[[Cookbook (Chapter 7)#Weld Offset|Weld Offset]]
**[[Cookbook_(Chapter_7)#Simple_Motors|7.11        Simple Motors]]<br />
##[[Cookbook (Chapter 7)#Simple Motors|Simple Motors]]
**[[Cookbook_(Chapter_7)#Motor_Speed|7.12        Motor Speed]]<br />
##[[Cookbook (Chapter 7)#Motor Speed|Motor Speed]]
**[[Cookbook_(Chapter_7)#Joints|7.13        Joints]]<br />
##[[Cookbook (Chapter 7)#Joints|Joints]]
*[[Cookbook_(Chapter 8)|Miscellaneous]]<br />
#[[Cookbook (Chapter 8)|Miscellaneous]]
**[[Cookbook_(Chapter_8)#Local_Parts|8.0        Local Parts]]<br />
##[[Cookbook (Chapter 8)#Local Parts|Local Parts]]
**[[Cookbook_(Chapter_8)#Using_CameraSubject|8.1        Using CameraSubject]]<br />
##[[Cookbook (Chapter 8)#Using CameraSubject|Using CameraSubject]]
**[[Cookbook_(Chapter_8)#Reflection_Metadata|8.2        Reflection Metadata]]<br />
##[[Cookbook (Chapter 8)#Reflection Metadata|Reflection Metadata]]
**[[Cookbook_(Chapter_8)#Testing_Chatted_Event|8.3        Testing Chatted Event]]<br />
##[[Cookbook (Chapter 8)#Testing Chatted Event|Testing Chatted Event]]


[[Cookbook_(Chapter 1)|Let's get started!]]
[[Cookbook (Chapter 1)|Let's get started!]]


[[Category:Cookbook]]
[[Category:Cookbook]]

Latest revision as of 01:13, 23 February 2012

Author

The entire cookbook was written by Camoy.

Preface

The RBX framework for Lua provides an API for creating 3D games for the ROBLOX game. The API has a vast variety of functionality such as functions for moving in game players to properties controlling custom in game GUIs. The API is easy to use and is quite powerful. This book will cover the basics of the framework and what you will need in order to start programming your own ROBLOX games.

Getting started is easy, just head on over to the download page in order to download the ROBLOX IDE (called Roblox Studio), and the browsing client.

This book assumes a prerequisite knowledge of Lua, however if you do not know Lua at all, don’t turn this book away yet. There are many good resources in learning Lua (one especially helpful resource is here). Even if you have no prior knowledge to Lua, in the early chapters, simple Lua syntax will be explained.

The documentation for the ROBLOX framework can be found at here, at the wiki. Under the “Building and Scripting” category, you will find a link to the “Scripting Reference” and the “Class Reference”. The “Scripting Reference” page is an index of the many scripting articles already written on the wiki site. You may find it useful to check out some of these articles as well. Under the “Class Reference” section, you will find all the ROBLOX objects and will be able to interactively explore their properties, methods, events, and general information. The ROBLOX IDE also has an “Object Browser” (found under Help --> Object Browser), however this is not as comprehensive as the wiki documentation.

In general, this book will provide solutions and examples of many types of problems you may need to solve when building a ROBLOX game. The difficulty level progresses as the book progresses. It is suggested that you read the book cover to back, however if there a certain solution that you need, feel free to jump to it.

Table of Contents

  1. Basics
    1. Part Instantiation
    2. Color and Transparency
    3. Applying the Touched Event
    4. Killing Players
    5. Removing Limbs
    6. Handling Non-Existent Objects
    7. Creating a Kill Brick
    8. Removing Multiple Limbs
    9. Removing All Character Parts
    10. Killing All Players
    11. Killing Random Players on Interval
    12. Using an Exception Table
    13. Killing Spawning Characters
    14. Creating a Message
    15. Debounce
    16. Creating a Clickable Part
    17. Touch Activated Explosion
    18. Dance Floor
    19. Creating a Healing Part
    20. Creating a Restricted Access Door
    21. Creating an Invisibility Part
  2. Positioning
    1. Positioning Types
    2. Simple Part Positioning
    3. Overlapping Positioning
    4. Simple CFrame Positioning
    5. Rotating Toward Another Position
    6. Rotating in Radians
    7. Rotating in Degrees
    8. Relative Positioning
    9. Getting Relative Position
    10. Using the Rotational Matrix
    11. Using Lerp
    12. Simple GUI Positioning
    13. Centering GUI
  3. GUI
    1. Introduction
    2. Text Label Instantiation
    3. Text Style
    4. Frame Styling
    5. Image Instantiation
    6. Creating a Button
    7. Creating a Fading GUI
    8. Text Box Input
    9. Using Adornment GUI
    10. Creating a Resize GUI
    11. Creating Custom 3D GUI
  4. Beyond the Basics
    1. Using BrickColor
    2. Using Color3
    3. Using Base Classes
    4. Using Enumerations
    5. Event Members
    6. Disconnecting a Connection
    7. Using LocalScripts
    8. Creating a Regeneration Button
    9. Creating a Template
    10. Creating a Leaderboard
    11. Creating a Point Earning Button
    12. Applying the Chatted Event
    13. Applying the Changed Event
    14. Applying the ChildAdded/Removing Event
    15. Descendants
    16. Creating a Marquee
    17. Using a SpecialMesh
    18. Using a VehicleSeat
    19. Using Fire
  5. Tools and HopperBins
    1. Introduction
    2. Creating a Reset
    3. Kill Tool
    4. Key Controls
    5. Creating a Sword
    6. Creating a Kick Tool
    7. StarterGear
  6. Service Level
    1. Introduction
    2. Using GetService
    3. Getting Server Time
    4. Using Lighting
    5. Awarding Badges
    6. Creator Badge
    7. Inserting Assets
    8. Retrieving IPs
    9. Setting Maximum Players
    10. Using Debris
  7. Moving
    1. Introduction
    2. Moving to a Position
    3. Moving in a Direction
    4. Rotating in a Direction
    5. Using BodyGyro
    6. Using Dampening
    7. Using Power
    8. Using BodyForce
    9. Using BodyThrust
    10. Simple Welding
    11. Weld Offset
    12. Simple Motors
    13. Motor Speed
    14. Joints
  8. Miscellaneous
    1. Local Parts
    2. Using CameraSubject
    3. Reflection Metadata
    4. Testing Chatted Event

Let's get started!