I'm currently creating a script that finds the center location between two points**(parts)** and creates a part that is positioned to the center position, and I'm also trying to make it so that it resizes the part to make it so that it covers both Point A and Point B, but I can't seem to figure out how to find the retangular/square size between both of them to cover them both. Here's my script:
local Point1 = workspace.Point1
local Point2 = workspace.Point2
local MidPoint = Instance.new("Part", workspace)
MidPoint.Name = "MidPoint"
MidPoint.Transparency = 0.5
MidPoint.Anchored = true
MidPoint.Position = (Point1.Position:Lerp(Point2.Position, 0.5)) -- works perfectly fine, part is moved to the center
MidPoint.Size = Vector3.new((Point1.Position + Point2.Position).Magnitude) -- part becomes a thin line instead of a square/rentagle that covers both points. I really don't know how to find the proper size

1 comment
Hi, could you mark my answer as a solution if it worked, or give feedback?