Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I use WriteVoxels?

I've read the article in the wiki but I don't understand how I am supposed to build the required tables to use it.

1 answer

The first is Region3.new() to do Region3 you need 2 Vector3s for opposite corners of a 3d square/rectangle so one corner would be backwardLeftDown and another would be forwardRightUp if you were inside the rectangle, to get the opposite corner. The 2nd argument is the resolution which is a fractional value ie. 1.2t3352 623.3289532 etc. 3rd Argument is {{{Enum.Material.Air}}} Which you set to the kind of material you want it to be filled with so if you wanted one block to be Air the next to be Water you would do {{{Enum.Material.Air},{Enum.Material.Water}}} 4th is occupancy which likewise is in a 3 dimensional table, except I'm not entirely sure what it does. You have to give a {{{num}}} like the materials, except you could probably figure out what it does with some testing. I would guess the size of the blocks themself in the Region3

2 comments

0

I get an error that reads Bad argument materials to 'WriteVoxels' (2x2x2 array expected). I am using small 4x4x4 regions

0

I think the problem is you have to include the material for each spot, so for each cube you're filling I think you need to include that spot specifically in the table

This discussion is preserved as it was. New answers, comments, and votes are closed.