Better position differences help?

Hello, whenever I try to get the difference in distance from the player and another part using Magnitude, and the part is larger than the distance, if the player is for example on top of the part, then the distance would be over the limit;

I don’t know how to explain this so I guess I’m asking how to get the distance between two parts from each side of each part?

Not sure if I understood correctly, but I believe you are trying to get a separate point from each axis. You can try this code out:

local Part = --Your Part Goes Here
game.Players.PlayerAdded:Connect(function(Player)
local Character = Player.Character or Player.CharacterAdded:Wait()
local HRP = Character:WaitForChild("HumanoidRootPart")
local XVector = Part.Position.X - HRP.Position.X
local YVector = Part.Position.Y - HRP.Position.Y
local ZVector = Part.Position.Z - HRP.Position.Z
-- Your Function Here
end)