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, Second Edition

You're reading from   Coding Roblox Games Made Easy, Second Edition Create, Publish, and Monetize your games on Roblox

Arrow left icon
Product type Paperback
Published in Jun 2022
Publisher Packt
ISBN-13 9781803234670
Length 302 pages
Edition 2nd 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 (15) Chapters Close

Preface Section I: Introduction to Roblox Development FREE CHAPTER
Introducing Roblox Development Knowing Your Work Environment Section II: Programming in Roblox
Introduction to Luau Roblox Programming Scenarios Creating an Obby Creating a Battle Royale Game Section III: The Logistics of Game Production
The Three Ms 50 Cool Things to Do on Roblox Worksheet Answers Other Books You May Enjoy
Index

Declaring and using loops

Loops are valuable components when it comes to programming, especially when working with sets of data. It would, of course, be quite unrealistic to expect a programmer to index and assign all one thousand elements of a hypothetical table to variables in order to perform some sort of operation. Or in a Roblox setting, manually change the properties of thousands of parts if you wanted to. To accomplish behaviors like this, loops are key. They function by jumping back to the beginning of their code block if a condition is still met, executing until they reach their terminating case.

for loops

for loops are a type of loop that are primarily used for iterating over datasets. In Luau, those datasets are typically related to tables or numbers. In Luau, there are two types of for loops: numeric for loops and generic for loops. The primary difference between these is what determines how they are executed. For numeric for loops, a variable is assigned to a...

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 $19.99/month. Cancel anytime