Simply, I want this:
To be become this:
I tested different solutions including this:
Non-working code
local function encaseface(part, offset, faceSize)
part.Anchored = true
part.Size = faceSize
part.Position += offset
part.Parent = workspace -- Parent to workspace or model
return part
end
local function partencase(part)
local size = part.Size
local position = part.Position
-- Top face (above the original part)
encaseface(part, Vector3.new(0, size.Y / 2 + 0.5, 0), Vector3.new(size.X, 1, size.Z))
-- Bottom face (below the original part)
encaseface(part, Vector3.new(0, -size.Y / 2 - 0.5, 0), Vector3.new(size.X, 1, size.Z))
-- Front face (in front of the original part)
encaseface(part, Vector3.new(0, 0, size.Z / 2 + 0.5), Vector3.new(size.X, size.Y, 1))
-- Back face (behind the original part)
encaseface(part, Vector3.new(0, 0, -size.Z / 2 - 0.5), Vector3.new(size.X, size.Y, 1))
-- Left face (left of the original part)
encaseface(part, Vector3.new(-size.X / 2 - 0.5, 0, 0), Vector3.new(1, size.Y, size.Z))
-- Right face (right of the original part)
encaseface(part, Vector3.new(size.X / 2 + 0.5, 0, 0), Vector3.new(1, size.Y, size.Z))
end
local function encase(part: BasePart)
local position = part.Position
local size = part.Size
end
local testpart = Instance.new("Part")
testpart.Anchored = true
testpart.Parent = workspace
testpart:PivotTo(CFrame.new(0, 20, 0))
partencase(testpart)
I want a function that allows me to create a 3d border around the part and specify the thickness. Sadly, I haven’t been able to achieve this. Any help at all is appreciated!



