Codectionary / Developer documentation / Luau

Folders

Organize related Roblox instances without giving the container physical behavior.

Why use Folder?

A Folder helps scripts and Studio users find a set of related instances. Unlike a Model, it has no pivot and is not a 3D assembly.

Try it in Roblox Studio

Run this Script from ServerScriptService in Roblox Studio. Inspect Workspace in Explorer after starting the server.

Syntax

local folder = Instance.new("Folder")
folder.Parent = workspace

Examples

Folders

Create one folder for collectible objects.

local collectibles = Instance.new("Folder")
collectibles.Name = "Collectibles"
collectibles.Parent = workspace

local marker = Instance.new("Part")
marker.Name = "PickupMarker"
marker.Anchored = true
marker.Parent = collectibles
  1. The Folder is a named container in Workspace, not a visible object.
  2. The Part becomes a child of Collectibles, so code can find it through workspace.Collectibles.
  3. Parenting a Part to a Folder under Workspace still places that Part in the 3D world.

Best practices

  • Use Folder for organization and Model when you need an assembly with a pivot.
  • Avoid relying on automatic names such as Part when several siblings may exist.

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