Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Coding Roblox Games Made Easy

You're reading from   Coding Roblox Games Made Easy The ultimate guide to creating games with Roblox Studio and Lua programming

Arrow left icon
Product type Paperback
Published in Jan 2021
Publisher Packt
ISBN-13 9781800561991
Length 238 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Zander Brumbaugh Zander Brumbaugh
Author Profile Icon Zander Brumbaugh
Zander Brumbaugh
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Section 1: Introduction to Roblox Development
2. Chapter 1: Introducing Roblox Development FREE CHAPTER 3. Chapter 2: Knowing Your Work Environment 4. Section 2: Programming in Roblox
5. Chapter 3: Introduction to Roblox Lua 6. Chapter 4: Roblox Programming Scenarios 7. Chapter 5: Creating an Obby 8. Chapter 6: Creating a Battle Royale Game 9. Section 3: The Logistics of Game Production
10. Chapter 7: The Three Ms 11. Other Books You May Enjoy

Creating variables and conditionals

In programming, a variable is a way for your code to hold various types of data, or data types. Variables are convenient because when you create one, you can give it an identifier so that it may be easily referenced later. In most programming languages, these variables are typed; this means that the type of variable must be declared when it is created. If you were to create a variable that holds a number, for example, you could only assign data that is a number to that variable. In Roblox Lua, variables are not typed; if you were to initialize a variable as a number, you could later set it to anything else without issue.

Important note

It should be noted that there is a new option for a typed version of Lua, though it is currently in beta, and not available to the general public.

It is important that you know what the most common data types are before you begin programming.

Data types

Integers are any whole, real number within a 64...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime