This script should make an hole in the wall.
But sometimes it works and sometimes it breaks (no error)
function CreateWall(edgepart:BasePart,doors,color:Color3,size:Vector3)
local Wall=Instance.new("Part")
Wall.Anchored=true
Wall.Size=Vector3.new(size.X,8.5,size.Z)
Wall.Material=Enum.Material.Concrete
Wall.Color=color
Wall.CFrame=edgepart.CFrame
Wall.Position+=Vector3.new(0,8.5/2,0)
for i,v:Model in doors do
local Negate=Instance.new("Part")
Negate.Anchored=true
Negate.Size=v:GetExtentsSize()
Negate.Position=v:GetBoundingBox().Position
Negate.Rotation=v.PrimaryPart.Orientation
Negate.Parent=workspace
local temp=Wall:SubtractAsync({Negate},Enum.CollisionFidelity.PreciseConvexDecomposition)
Wall:Destroy()
--temp:Clone().Parent=workspace
Wall=temp:Clone()
Negate:Destroy()
temp:Destroy()
end
--Wall:Clone().Parent=workspace
return Wall
end
Please help me there was an similar topic but it didnt help me
and my spelling garbage