Roblox Lesson 11
Roblox Lesson 11
Learning Objectives:
1. Nested Loops
2. Positioning Objects
- Physical objects in a Roblox game can be positioned in various ways, depending on your
design goals.
- The global position of an object is determined by its three position properties X, Y and Z.
- The position is based on the center of the object.
- Vector3 describes a vector in a 3D space. It supports basic component-based arithmetic
operators such as:
1. Sum
2. Subtraction
3. Multiplication
4. Division
- Some example usages of Vector3 are:
1. Position
2. Rotation
3. Size
4. Parts
X
Colored Cube Maker:
If you wanted to code a game where players can make multiple-colored cubes at a time, you
can use one loop to control how many batches of cubes to make, and an inner loop to control
how many cubes are made per batch.
1. In an empty baseplate file, click on the “+” button beside the Workspace and add in a new script.
Outer
Inner
Loop
Loop
1. In an empty baseplate file, click on the “+” button beside the Workspace and add in a new script.