How to Remove Region of Terrain more Sharpley

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

i’m pretty sure thats just how terrain works, you can’t cut a perfect shape with it

I get that but is there anyway I can make it a little better? like its so inaccurate it cant be the best way of doing it

You can use Part To Terrain Plugin
here’s the link: (Part to Terrain - Roblox)
I hope it helps you

Does it work mid game? Cause I need to destroy/Replace terrain during the game

u can use explosions to remove terrain
(its not 100% smooth but works anyways
i hope it solved ur problem.