Citizen.CreateThread(function() local closestDoor, closestDist = exports["doors_creator"]:getClosestActiveDoor() if(closestDoor and closestDist < 3.0) then print("The closest door is " .. closestDoor.id .. " and is " .. closestDist .. " meters away") endend)