Codectionary / Developer documentation / Luau

Part properties

Create a physical block and control its size, position, color, and anchoring.

Why use Part?

A Part is a basic 3D building block. Its properties describe both its appearance and how it behaves in the world; anchoring prevents gravity and collisions from moving a static platform.

Try it in Roblox Studio

Put a Script in ServerScriptService and run the place in Roblox Studio. The block appears in Workspace; this engine API is unavailable in a standalone Luau interpreter.

Syntax

local part = Instance.new("Part")
part.Anchored = true
part.Parent = workspace

Examples

Part properties

Create a visible platform at a known position.

local platform = Instance.new("Part")
platform.Name = "PracticePlatform"
platform.Size = Vector3.new(12, 1, 12)
platform.Position = Vector3.new(0, 5, 0)
platform.Anchored = true
platform.Color = Color3.fromRGB(40, 130, 255)
platform.Parent = workspace
  1. Instance.new creates an unparented Part; the property assignments configure it before it enters the world.
  2. Size and Position use Vector3 values measured in studs. Parent = workspace makes the configured part appear.
  3. An anchored part stays fixed. For movable physics objects, leave Anchored false and account for gravity and collisions.

Best practices

  • Set important properties before assigning Parent to avoid a briefly visible default part.
  • Give created instances meaningful names so they are easy to find in Explorer.

Runtime & versions

Luau host; Roblox engine examples require Roblox Studio. Feature availability depends on the language and runtime version used by your project; consult the official reference below.

Luau documentation

Specifications & further reading