Trying to compensate for size in Magnitude

I’m trying to make a script that checks all of the workspace’s part positions to see if they are a certain distance away from the player, but I want to take size into account. For example:
A part has a size of 30 on each axis and a player is placed 2 studs away from any corner of the part. If we check the magnitude of (part.Position - playerCharacter.HumanoidRootPart.Position).Magnitude and make sure it is under 5, then it would be false, since it’s checking from the single point in the middle of the part. How would I compensate for this not using raycasting?

Are you able to make any assumptions about the shape and orientation of these parts? In other words, are these parts axis-aligned rectangles or are they randomly rotated meshparts or something?

Edit: I apologize for responding to a 2 year old thread, I’m not sure why it appeared at the top of my feed