Build and edit terrain
terrainFill, repaint, and clear voxel solids in Roblox with block, ball, cylinder, or wedge primitives; swap materials or carve by using Air.
Instructions
Fills, repaints and clears Roblox terrain — hills, water, caves, roads.
Terrain is not made of instances, so none of the instance tools reach it: there is nothing to create, no path for find, and no property for modify. This is the only way to shape it short of writing FillBall calls by hand through execute_luau.
fill takes an ARRAY of solids and applies them as one undo step, which is how terrain is actually built: a hill is several overlapping balls, a road is a row of blocks. Shapes are block (needs size), ball (needs radius), cylinder (needs radius and height) and wedge (needs size).
To CARVE, fill with material Air. That is not a special mode — a cave is a ball of Air inside a hill, and a tunnel is a row of them.
replace swaps one material for another inside a region and leaves the shape alone, which is how you turn a grass hill to snow without rebuilding it. clear empties a region, or everything with confirm=true. stats says whether the place uses terrain at all -- call it first in an unfamiliar place. It cannot say WHERE the terrain is: Roblox exposes no bounding box for it, only the fixed limit. Take a screenshot to see the shape.
Positions are the centre of the solid, in studs, as "x, y, z". Terrain snaps to a 4-stud voxel grid, so small features come out blockier than the numbers suggest; nothing thinner than about 4 studs survives.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | 'fill' adds solids (use material Air to carve), 'replace' swaps a material in place, 'clear' empties a region or everything, 'stats' reports what is there. | stats |
| to | No | replace only: the material to write instead. | |
| from | No | replace only: the material to look for. | |
| size | No | replace and clear: extent of the region in studs, e.g. "512, 256, 512". | |
| shapes | No | fill only: the solids to apply, together, as one undo step. | |
| confirm | No | clear only: required to empty ALL terrain. Omit it and give `position`/`size` to clear one region instead. | |
| position | No | replace and clear: centre of the region, e.g. "0, 0, 0". | |
| studioId | No | Target Studio; omit for the active one. |