-- Correct probe: mainline deck parts are named "Road". Barriers are found by -- actual name, not a guess. Also verifies the ramp tip lands ON a Road part -- (not merely near one) and that the median parapet really is open at the -- junctions. local ws = game:GetService("Workspace") local map = ws:FindFirstChild("Map") local exp = map:FindFirstChild("Expressway") local road, runs = {}, {} local barrierNames = {} for _, d in ipairs(map:GetDescendants()) do if d:IsA("BasePart") then local nm = d.Name if nm:gsub("_?%d+$", "") == "Road" then table.insert(road, d) end for _, base in ipairs({ "PAEntryRampNear", "PAExitRampNear", "PAEntryRampTrunk", "PAExitRampTrunk" }) do if nm:sub(1, #base + 1) == base .. "_" then runs[base] = runs[base] or {} table.insert(runs[base], d) end end if nm:lower():find("barrier") or nm:lower():find("parapet") or nm:lower():find("wall") or nm:lower():find("rail") then local b = nm:gsub("_?%d+$", "") barrierNames[b] = (barrierNames[b] or 0) + 1 end end end local out = {} table.insert(out, "roadDeckParts=" .. #road) local bn = {} for k, v in pairs(barrierNames) do table.insert(bn, k .. "=" .. v) end table.sort(bn) table.insert(out, "barrier-ish: " .. table.concat(bn, " ")) local function sortKey(p) return tonumber(p.Name:match("_(%d+)$")) or 0 end -- Ramp tip -> nearest Road part, horizontal and vertical separately. for _, base in ipairs({ "PAEntryRampNear", "PAExitRampNear" }) do local parts = runs[base] if not parts then table.insert(out, base .. ": MISSING") continue end table.sort(parts, function(a, b) return sortKey(a) < sortKey(b) end) for _, which in ipairs({ { "head", parts[1] }, { "tail", parts[#parts] } }) do local p = which[2] local bestH, bestDY = math.huge, 0 for _, m in ipairs(road) do local h = (Vector3.new(p.Position.X, 0, p.Position.Z) - Vector3.new(m.Position.X, 0, m.Position.Z)).Magnitude if h < bestH then bestH = h bestDY = p.Position.Y - m.Position.Y end end table.insert(out, ("%s %s: horizToRoad=%.1f dY=%.1f"):format(base, which[1], bestH, bestDY)) end end return table.concat(out, "\n")