I’m trying to get 4 corners on a part ignoring the X axis however because I’m dividing the size by 2 to get the corners its also dividing the rotation by 2 making the results inaccurate on rotated parts. How would I fix this?
local function GetPartCorners(Part)
local Size = Part.Size
return {
CFrame.new(0, -Size.Y / 2, -Size.Z / 2) * Part.CFrame,
CFrame.new(0, -Size.Y / 2, Size.Z / 2) * Part.CFrame,
CFrame.new(0, Size.Y / 2, -Size.Z / 2) * Part.CFrame,
CFrame.new(0, Size.Y / 2, Size.Z / 2) * Part.CFrame,
}
end