local function ClosestPath()
local DisList = DistanceList() --The list is made up of integers
local key, min = 1, DisList[1]
for i, v in ipairs(DisList) do
if DisList[i] < min then
key, min = i, v
end
end
return key
end
The list is suppose to give me the key of the lowest integer so I can decipher the lowest distance.
