Basically, if you’re trying to figure out which edge of a part a Vector3 is closest to, I would do something like this:
- Get the position in object space - use
local localPos = Part.CFrame:ToObjectSpace(mousePosition).pfor that - Check the components of that vector.
- (for example) If
localPos.Xis close toPart.Size.X / 2, then you’re on the right-side face. IflocalPos.Yis also close to-Part.Y / 2, then you’re also on the bottom-side face. Hurray! Now you know you’re on the right-bottom edge!