Roblox Objects
Lua Roblox Part
Working with Parts
Lua Roblox Part manipulates 3D objects with Position and Size.
Understanding the Part Object
In Roblox, a Part is a fundamental building block for creating 3D objects. It represents a physical object in the game world and can be manipulated through various properties, such as Position and Size.
Setting the Position of a Part
The Position property of a Part determines its location in the 3D world. You can set this property using a Vector3 value, which consists of X, Y, and Z coordinates.
Modifying the Size of a Part
The Size property controls the dimensions of a Part. This property also uses a Vector3 value to specify width (X), height (Y), and depth (Z).
Combining Position and Size
By combining both Position and Size, you can precisely control the placement and dimensions of objects in your game.
Practical Application
Use these properties to create platforms, obstacles, or any other objects you can imagine. For example, a simple platform can be created with a specific size and position:
In this example, we also set the Anchored property to true
to prevent the platform from moving due to physics.
Roblox Objects
- Previous
- Instance Properties
- Next
- Model