Create parts at runtime, pin them with Anchored, and style them with materials — no Studio viewport required.
You've made GUIs, scripts, and folders with Instance.new. This lesson levels up your world-building: creating parts at runtime — so your game can build its own terrain, spawn obstacles, and reshape the world while it runs.
The baseplate in your game could be made entirely in code:
local part = Instance.new("Part")
part.Name = "Ground"
part.Size = Vector3.new(500, 2, 500)
part.Position = Vector3.new(0, 0, 0)
part.Anchored = true -- real physics off: it won't fall
part.Material = Enum.Material.Grass
part.Parent = workspace
Same recipe as GUI: create, set properties, parent. A Vector3 is a set of three numbers — here, size in studs.
Why do you set Anchored = true on a platform part?
Anchored = true pins a part in 3D space — no falling, no rolling, no physics. Ground, walls, and obstacles are anchored; coins and pickups are not.
part.Anchored = true -- static: platforms, walls, ramps
part.Anchored = false -- physical: coins, balls, props
A part that falls is just a part with Anchored = false (and gravity on). Want a coin that drops onto a platform? Leave it unanchored and it obeys physics.
A static platform needs Anchored = so it doesn't fall.
Enum.Material.Grass, Enum.Material.Metal, Enum.Material.Neon — Roblox ships thousands of named choices for materials and colors:
part.Material = Enum.Material.Neon
part.Color = Color3.fromRGB(255, 200, 50)
Enums are Roblox's huge, named lists of options: materials, colors, keycodes, math operations. Instead of remembering that material #123 is grass, you write Enum.Material.Grass. Type Enum. in Studio and autocomplete shows everything.
Make a gold-looking part: set its Material to Neon and its Color to bright yellow (255, 220, 0).
-- style the part
part.Material = 123 works by luck. Enum.Material.Grass is readable and stable.workspace or it never renders.CFrame carries the rotation too (you'll meet it in the tweens lesson).Next: sticky notes for your objects — attributes.