Answered by
6 years ago Edited 6 years ago
If you're trying to split up a cube, then the following should work.
01 | function splitCube(block, divisions) |
02 | for x = (-divisions/ 2 + 0.5 ), (divisions/ 2 ) do |
03 | for y = (-divisions/ 2 + 0.5 ), (divisions/ 2 ) do |
04 | for z = (-divisions/ 2 + 0.5 ), (divisions/ 2 ) do |
05 | local p = block:Clone() |
06 | p.Parent = block.Parent |
07 | p.Size = block.Size / divisions |
08 | p.CFrame = block.CFrame + (Vector 3. new(x, y, z) * (p.Size.x)) |
The +0.5
is down to the way position is in the centre of a part, not the edge.
Alternatively, you could increase the BlastPressure of whatever explosions you're using.