I’m making a project heavily revolving terrain, and I need to be able to modify it in the game. Ideally, using a script.
I wasn’t able to find anything in the articles, devforum, and barely anything on youtube.
Explain like you’d explain to a 5 year old. Every event, property(?), anything related to scripting terrain.
These may help you:
1 Like
Step one, click this link: Terrain | Documentation - Roblox Creator Hub.
Terrain on Roblox (via the Terrain instance under Workspace) is based on a 3D grid of voxels. Each voxel is 4x4x4 studs in volume. Every voxel has 3 components:
- LiquidOccupancy; Value = [0-1]; Represents how much Water is in the voxel
- SolidMaterial; Value = Enum.Material; Represents which Enum.Material this voxel is filled with
- SolidOccupancy; Value = [0-1]; Represents how much SolidMaterial is in the voxel
The newest APIs for scripting Terrain are Terrain:ReadVoxelChannels
and Terrain:WriteVoxelChannels
which will reference the components listed above. However, some use cases may prefer more intuitive methods such as Terrain:FillBall
or Terrain:FillBlock
.
I have no idea why I haven’t seen this before. Thanks!