Reader small image

You're reading from  Coding Roblox Games Made Easy, Second Edition - Second Edition

Product typeBook
Published inJun 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781803234670
Edition2nd Edition
Languages
Tools
Right arrow
Author (1)
Zander Brumbaugh
Zander Brumbaugh
author image
Zander Brumbaugh

Zander Brumbaugh is an independent programmer, project manager, and game designer. The games he has made or contributed to have been played more than 300 million times. Some popular titles include My Salon, Power Simulator, Munching Masters, etc. With the games he has created, he has been able to create a successful business while in college; he currently attends the University of Washington and is part of the Paul G. Allen School of Computer Science and Engineering. At the time of writing, Zander is 19 years old.
Read more about Zander Brumbaugh

Right arrow

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 page is locked
Previous PageNext Page
You have been reading a chapter from
Coding Roblox Games Made Easy, Second Edition - Second Edition
Published in: Jun 2022Publisher: PacktISBN-13: 9781803234670

Author (1)

author image
Zander Brumbaugh

Zander Brumbaugh is an independent programmer, project manager, and game designer. The games he has made or contributed to have been played more than 300 million times. Some popular titles include My Salon, Power Simulator, Munching Masters, etc. With the games he has created, he has been able to create a successful business while in college; he currently attends the University of Washington and is part of the Paul G. Allen School of Computer Science and Engineering. At the time of writing, Zander is 19 years old.
Read more about Zander Brumbaugh