Hello
Basically im trying to cut out a room size hole in some terrain. but there’s always either empty space between the outside of the rooms walls and the terrain. Or the terrain is intersecting inside the room.
First image is the room before terrain is cut
These are photos of after the terrain is cut
As you can see there’s terrain inside the room as well as empty space outside the room
I also need this accurate because if I remove the room I want it so that the terrain fills in the same place. which it doesn’t always do either.
This is the function that I use to remove the terrain
local min
local max
local Box = game.Workspace.Model.MainPart -- a part thats the same size as the room
min = Box.Position - (0.50 * Box.Size)
max = Box.Position + (0.50 * Box.Size)
local region = Region3.new(min, max)
region = region:ExpandToGrid(4)
game.Workspace.Terrain:FillRegion(region, 4, Enum.Material.Air)
Box:Destroy()
Is there anyway this can be fixed. please let me know because this is pretty urgent
Thank you for taking the time to read