Hey Paul,
function resolvedots(path) local res = _G for w in string.gmatch(path..".", "(.-)%.") do res = res[w] end return res end