Distances between entities

Hey, I am trying to make an entitity, can anyone tell me how to display the distance of the closest nearby entity (a custom entity I made?)

Distance(enta:GetPos() , entb:GetPos())

Make enta the player’s position and then make a table of your custom entity using ents.FindByClass and then sort them on distance.

Ninjad.

Thank you all very much!