Lesson 2 of 7

Parts, models, materials and pivots

Learn Roblox parts by building Beacon Yard's walls, gates and spawn by hand in Studio, then read how MapBuilder places the coin pads, beacon and drone with Anchored, CanTouch, materials, Models and pivots.

Project lesson, about 70 minutes, 10 steps

By the end you can

  • Set Anchored, CanCollide and CanTouch on purpose, and predict what each one changes
  • Read a part's size, position and material in studs, and place parts by numbers
  • Group parts into a Model and explain what PrimaryPart and PivotTo do

Before this: The Studio tour: panels, camera, shortcuts

Step 1 of 10

A floor that falls

Insert a part in an empty Baseplate, lift it, and press Play. It drops and bounces. Now imagine the whole floor of Beacon Yard doing that on the first frame of a game: every player falls into the void before they see anything.

That floor is a Part, Roblox's basic building block: a box (or ball, cylinder or wedge) with a size, a position, a colour and a material. Everything in the yard you can stand on starts as one. Whether it falls is one switch.

Choose one

Which property stops gravity and other forces from ever moving a part?

Which property stops gravity and other forces from ever moving a part?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 2 of 10

Three separate switches

A part has three physics switches, and beginners mix them up1:

  • Anchored: true means gravity and collisions never move it. Most of a built world should be anchored.
  • CanCollide: true means it is solid; characters and other parts bump into it.
  • CanTouch: true means it fires the Touched and TouchEnded events when something touches it. Those events fire even when CanCollide is false; with CanTouch false, neither fires2. Both parts need CanTouch on, and at least one of the two must be unanchored. That is why an anchored coin only notices avatars: the character is unanchored and touchable.

They combine freely. Beacon Yard's coin is anchored, not solid and touchable: you walk through it and the touch is noticed. The drone's invisible spawn marker at (0, 4, 18) is anchored with all three of CanCollide, CanTouch and CanQuery off: it is only a position.

Server sideThe Touched event is a bump sensor.
In the pictureIn Roblox
The sensor on a partBasePart.Touched
Each bumpOne event per part that starts touching
What the sensor cannot tell youWho meant it, and whether it was fair

See the whole analogy cast

Touched is a bump sensor. When a moving body part bumps a part, the sensor fires, once per bump, for every body part that bumps it.

Think of it as A bump sensor

Choose all that apply

Beacon Yard's coin must hover in place, let players walk through it, and notice when they do. Which settings does CoinService give it?

Beacon Yard's coin must hover in place, let players walk through it, and notice when they do. Which settings does CoinService give it?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 3 of 10

When the bump sensor stays quiet

The drone in Beacon Yard is anchored and moved by script every frame with PivotTo. It flies straight into players. Will its parts fire Touched?

Server sideRemember: The Touched event is a bump sensor.

Where does it break?“A bump sensor” is a good picture of the touched event. Where does it stop being true?

It breaks here. It fires many times for one contact, and a part moved by setting its CFrame (PivotTo) makes no bump by moving, so a drone that lands on a player standing still never fires it.

The true model. Touched fires when the physics engine sees two parts start touching through simulated movement, and at least one of them must be unanchored. It fires per part, repeatedly, and not when a script sets a CFrame so that parts overlap. Gameplay needs its own guard, and moving hazards often use a distance check instead.

Touched only fires from physical simulation, not when a script sets a position or CFrame2. That is why the drone hurts players with a distance check on the server instead of a touch. A real bump sensor would not care how the robot moved. Roblox's does.

Choose one

Why does DroneService measure the distance to each player every frame instead of using the drone's Touched event?

Why does DroneService measure the distance to each player every frame instead of using the drone's Touched event?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 4 of 10

Sizes and places in studs

Roblox measures length in studs. The docs equate one stud with 28 cm, and default gravity is 196.2 studs per second squared3. Beacon Yard's place uses exactly that gravity.

Every part has a Size (X, Y, Z) and a Position, the centre of the part. A part's top is its centre Y plus half its height. The yard's numbers:

  • The base is 96 × 1 × 96 studs, centred at Y = −0.5, so its top is exactly Y = 0.
  • The walls are 10 studs tall and 2 thick. Their centres sit at Y = 5 and 45 studs out, so their inner faces are 44 studs from the middle.
  • The spawn is a SpawnLocation at (−30, 3, 0), on the west side. It is a raised pad: 1 stud thick and centred at Y = 3, so its top is at 3.5, not 0.
  • The shop (added in a later milestone) is a 6-stud cube at (28, 3, 28): its bottom is at Y = 0.
Roblox Studio
Top-down Play view of Beacon Yard: six gold pads in a ring around the cyan beacon at the centre, on a dark asphalt base, with the idle HUD in the corner.

Select a numbered pin, or a row below, to read what it marks.

Six pads, 22 studs from the centre, around the beacon, in the finished yard.

Work it out

A wall is 10 studs tall and its Position.Y is 5. At what Y is its top face?

studs

Link to this step · This confused me

Step 5 of 10

Build the walls by hand in Studio

At m00-baseplate, Workspace.Yard holds only Base. Milestone m01-first-parts adds seven wall and gate parts plus a SpawnLocation named Spawn, each placed with exact numbers. You will build all eight by hand in Studio using Properties (later, Rojo and Git day to day shows how teams write these same parts in a Rojo project file under Git).

Every wall and gate is a Part inside Workspace.Yard with Anchored = true, Orientation = 0, 0, 0, Color = 62, 66, 74, Material = DiamondPlate, TopSurface = Smooth and BottomSurface = Smooth:

NameClassSize (X, Y, Z)Position (X, Y, Z)Extra properties
WallSouthPart92, 10, 20, 5, -45Anchored, DiamondPlate, Color 62, 66, 74, Smooth top/bottom
WallEastPart2, 10, 9245, 5, 0Same as WallSouth
WallWestPart2, 10, 92-45, 5, 0Same as WallSouth
WallNorthLeftPart38, 10, 2-27, 5, 45Same as WallSouth
WallNorthRightPart38, 10, 227, 5, 45Same as WallSouth
GateLeftPart8, 10, 2-4, 5, 45Same as WallSouth
GateRightPart8, 10, 24, 5, 45Same as WallSouth
SpawnSpawnLocation6, 1, 6-30, 3, 0Anchored = true, Neutral = true, Duration = 0, Color = 186, 168, 120, Material = SmoothPlastic, Smooth top/bottom
  1. Open the m00-baseplate place in Studio. Right-click Workspace.Yard in Explorer, insert a Part, rename it WallSouth, and set its properties from the table: Anchored = true, Size = 92, 10, 2, Position = 0, 5, -45, Orientation = 0, 0, 0, Color = 62, 66, 74, Material = DiamondPlate, TopSurface = Smooth and BottomSurface = Smooth.

    You should see Studio shows a 92-stud diamond-plate wall named WallSouth along the south edge of the base, its top at Y = 10.

  2. Duplicate WallSouth with Ctrl+D (Cmd+D on a Mac) four times to make WallEast, WallWest, WallNorthLeft and WallNorthRight. Because you duplicated WallSouth, Anchored, colour, material and smooth surfaces are already set; update each part's Name, Size and Position to match the table.

    You should see Four walls enclose the base with a 16-stud gap in the north wall.

  3. Duplicate one wall twice for GateLeft and GateRight using the table's sizes and positions. Then right-click Workspace.Yard, insert a SpawnLocation, rename it Spawn, and set Anchored = true, Neutral = true, Duration = 0, Size = 6, 1, 6, Position = -30, 3, 0, Orientation = 0, 0, 0, Color = 186, 168, 120, Material = SmoothPlastic, TopSurface = Smooth and BottomSurface = Smooth.

    You should see Two 8-stud gates fill the north gap, and Spawn sits on the west side with no force field.

  4. Press Play (F5) and walk around the walled yard. Press Stop (Shift+F5) when you are happy. Your yard now matches the m01-first-parts milestone.

    You should see Your avatar spawns at (-30, 3, 0) on the west side with no force field, and every wall, gate and spawn stays put.

Link to this step · This confused me

Step 6 of 10

Materials

Material is more than paint. It sets how a surface looks and how it behaves physically: its density and friction. Neon glows. Beacon Yard uses Asphalt for the base, DiamondPlate for the walls, and Neon for the coin pads, the beacon pedestal and the shop, so the things you interact with light up at dusk.

From m06-drone-wrench, WorldLook can also hang a MaterialVariant on the base and walls: a custom texture set on top of a built-in material. If the variant is missing, the part's own Material is the fallback, so the yard never turns invisible.

Choose one

Why are the pads, the pedestal and the shop Neon while the walls are DiamondPlate?

Why are the pads, the pedestal and the shop Neon while the walls are DiamondPlate?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 7 of 10

Models and pivots

A Model groups instances so they move and select together4. In Studio, select parts and press Ctrl+G (Cmd+G on a Mac). A model has a pivot, the point it treats as its origin, and PivotTo(cframe) moves the whole model so its pivot lands there. PrimaryPart names the part the pivot follows.

Beacon Yard shows both habits later in the course. MapBuilder makes a Model named Beacon holding the pedestal and the crystal anchor, and never sets a PrimaryPart: the model is there for grouping and finding. The drone is different. DroneService sets PrimaryPart to the drone's root part, then calls model:PivotTo(...) every frame to fly it, and every child follows.

Here is the helper that builds every structural part later at m06-drone-wrench. Read the order of the lines:

local function anchoredPart(
	name: string,
	size: Vector3,
	cframe: CFrame,
	color: Color3,
	material: Enum.Material,
	parent: Instance
): Part
	local part = Instance.new("Part")
	part.Name = name
	part.Anchored = true
	part.Size = size
	part.CFrame = cframe
	part.Color = color
	part.Material = material
	part.TopSurface = Enum.SurfaceType.Smooth
	part.BottomSurface = Enum.SurfaceType.Smooth
	part.Parent = parent
	return part
Roblox Studio
Studio during Play with the beacon pedestal selected: Explorer shows the Beacon model with Pedestal and CrystalAnchor inside, and Properties shows Anchored true and Material Neon.

Select a numbered pin, or a row below, to read what it marks.

The pedestal selected during Play at m06: a child of the Beacon model, anchored, Neon.

Find the broken line

This helper sometimes lets the floor fall for a moment when the server starts. Which line is in the wrong place?

This helper sometimes lets the floor fall for a moment when the server starts. Which line is in the wrong place?

Press 1 to 5 to choose, Enter to check.

Link to this step · This confused me

Step 8 of 10

Six pads on a circle

Later at m06-drone-wrench, MapBuilder does not store six pad positions by hand. It computes them: six even angles around a circle of radius 22, with cosine for X and sine for Z.

	for index = 1, 6 do
		local angle = (index - 1) * (math.pi * 2 / 6)
		local pad = anchoredPart(
			"Pad" .. tostring(index),
			Vector3.new(4, 1, 4),
			CFrame.new(math.cos(angle) * 22, 0, math.sin(angle) * 22),
			PAD_COLOR,
			Enum.Material.Neon,
			padsFolder
		)
		pad:SetAttribute("PadIndex", index)
		CollectionService:AddTag(pad, "CoinPad")
		table.insert(pads, pad)

Pad 1 has angle 0: cos 0 = 1 and sin 0 = 0, so it sits at (22, 0, 0). Its centre is at Y = 0 and it is 1 stud tall, so it rises half a stud above the base's top: you step onto it.

Choose one

Pad 4 has index 4, so its angle is 3 × 60° = 180°. Where is it?

Pad 4 has index 4, so its angle is 3 × 60° = 180°. Where is it?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 9 of 10

Challenges

Level 1, Apprentice

Challenge

In edit mode on m01-first-parts (or the yard you just built), select Workspace.Yard.Spawn and GateLeft and read their properties without changing anything.

Start from
m01-first-parts, edit mode

Done means

  • You can say Spawn's Anchored, Neutral, Duration and Material values
  • You can check that GateLeft and GateRight meet at X = 0 with no gap

Meet the criteria above, then record your own result. No test grades this check.

Level 2, Builder

Challenge

Group GateLeft and GateRight into a Model, change their material to Neon and colour to light blue, press Play to look, then Stop and put them back.

Start from
m01-first-parts, edit mode

Done means

  • GateLeft and GateRight are grouped into a Model named NorthGate (Ctrl+G / Cmd+G)
  • Both gates turned Neon light blue during Play and stayed anchored
  • You ungrouped or restored the colour back to DiamondPlate 62, 66, 74

Meet the criteria above, then record your own result. No test grades this check.

Work it out

The shop is a 6-stud cube centred at Y = 3. An awning 0.2 studs thick should float 1 stud above the shop's roof. What Position.Y should the awning have?

studs

Level 3, Professional

Challenge

For this stretch challenge, give the shop a glass awning built in code so it comes back on every Play. To get a pass code, make the change on m14-ship, press Play and run this in the server command bar:

luau
game.ServerScriptService.RunGameTests:Invoke("parts-and-world")
Start from
The game at milestone m06 (download)
Grade it
To grade work from an earlier milestone, apply your challenge changes to a checkout based on m14-ship, which includes the Course Runner. In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("parts-and-world") in the server command bar. Copy the pass code from Output.

Done means

  • MapBuilder creates Workspace.Yard.Awning: Size 8, 0.2, 6, Material Glass
  • Its Position is exactly 28, 7.2, 28 (the test needs 7.2, a little above the 7.1 you worked out in the question)
  • It is anchored and does not collide, query or touch

The Course Runner prints this code when the test passes.

Link to this step · This confused me

Step 10 of 10

Recap

Recap

  1. Anchored, CanCollide and CanTouch are three separate switches; Touched fires from physics only, never from PivotTo or setting a CFrame.
  2. Sizes and positions are in studs, Position is the centre, and every wall, gate and spawn in m01-first-parts can be placed by exact numbers in Properties.
  3. A Model groups parts; PrimaryPart plus PivotTo moves the whole model, as the drone does every frame.

The Touched event is a bump sensor, until it fires many times for one contact, and a part moved by setting its CFrame (PivotTo) makes no bump by moving, so a drone that lands on a player standing still never fires it.

Next 3D math you actually need: vectors, distance, CFrame

Link to this step · This confused me

Sources
  1. Parts. Roblox Creator Documentation, checked 2026-11-13.
  2. Collisions. Roblox Creator Documentation, checked 2026-11-13.
  3. Roblox units. Roblox Creator Documentation, checked 2026-11-13.
  4. Models. Roblox Creator Documentation, checked 2026-11-23.