Loading...
Loading...
Build 3D objects, props, maps, and environments in Roblox Studio via MCP. CSG patterns, spatial coordination, player scale reference, platform quirks. Use when the AI is placing parts, doing unions/subtracts, or building geometry.
npx skill4agent add tabooharmony/roblox-brain roblox-building-- MUST be at the start of every MCP call
local model = workspace:FindFirstChild("MyBuild")
if not model then
model = Instance.new("Model")
model.Name = "MyBuild"
model.Parent = workspace
endlocal existing = model:FindFirstChild("TableTop")
if existing then
print(existing.CFrame, existing.Size) -- read before calculating offsets
endlocal Def = {
Width = 6.0,
Depth = 3.0,
Height = 2.8,
TopThickness = 0.2,
LegSize = 0.3,
LegInset = 0.1,
}local top = Instance.new("Part")
top.Size = Vector3.new(Def.Width, Def.TopThickness, Def.Depth)
top.CFrame = CFrame.new(0, Def.Height - Def.TopThickness / 2, 0)
top.Anchored = true
top.Parent = model
-- Legs relative to top
local legH = Def.Height - Def.TopThickness
local leg = Instance.new("Part")
leg.Size = Vector3.new(Def.LegSize, legH, Def.LegSize)
local ox = Def.Width / 2 - Def.LegSize / 2 - Def.LegInset
local oz = Def.Depth / 2 - Def.LegSize / 2 - Def.LegInset
leg.CFrame = top.CFrame * CFrame.new(ox, -(Def.TopThickness / 2 + legH / 2), oz)
leg.Anchored = true
leg.Parent = modellocal EPSILON = 0.05
-- Hole through a 1-stud thick wall
local wall = Instance.new("Part")
wall.Size = Vector3.new(10, 10, 1)
local cutter = Instance.new("Part")
-- Add EPSILON*2 to the axis passing through the wall
cutter.Size = Vector3.new(2, 2, 1 + EPSILON * 2)
cutter.CFrame = wall.CFramelocal success, result = pcall(function()
return basePart:SubtractAsync({cutterPart})
end)
if success and result and result:IsA("BasePart") then
result.CFrame = basePart.CFrame -- preserve exact transform
result.UsePartColor = true
result.Color = basePart.Color
result.Material = basePart.Material
result.Name = basePart.Name
result.Anchored = true
result.Parent = basePart.Parent
basePart:Destroy()
cutterPart:Destroy()
else
warn("CSG failed:", result)
cutterPart:Destroy()
endCollisionFidelity = Enum.CollisionFidelity.Boxlocal pillar = Instance.new("Part")
pillar.Shape = Enum.PartType.Cylinder
pillar.Size = Vector3.new(10, 2, 2) -- Length, Diameter, Diameter
pillar.CFrame = CFrame.new(0, 5, 0) * CFrame.Angles(0, 0, math.pi / 2)| Desired tip direction | Rotation |
|---|---|
| Up (+Y) | |
| Down (-Y) | |
| Forward (+Z) | none |
| Backward (-Z) | |
Anchored = trueCanCollide = trueCastShadow = truelocal TARGET = "MyBuild" -- change to your model/folder name
local root = workspace:FindFirstChild(TARGET)
if not root then print("[ERROR] " .. TARGET .. " not found"); return end
local errors, warnings, parts = 0, 0, 0
for _, desc in ipairs(root:GetDescendants()) do
if desc:IsA("BasePart") then
parts += 1
if not desc.Anchored then
print("[ERROR] " .. desc:GetFullName() .. " not Anchored")
errors += 1
end
if desc.Position.Y - desc.Size.Y / 2 < -0.5 then
print("[WARN] " .. desc.Name .. " below floor")
warnings += 1
end
if desc.Color == Color3.new(163/255, 162/255, 165/255) and desc.Material == Enum.Material.Plastic then
print("[WARN] " .. desc.Name .. " uses default color/material")
warnings += 1
end
end
end
print(string.format("Parts: %d | Errors: %d | Warnings: %d", parts, errors, warnings))workspace/
MapName/ (Folder)
Origin (invisible anchor at 0,0,0)
Terrain/ (ground planes)
Zone_Spawn/
Floor
Walls/
Props/
Zone_Arena/
Landmarks/
Lighting/ (PointLights, SpotLights)
Spawns/ (SpawnLocation instances)