-- Why did the building-clip probe return 0 with a 0 control? Diagnose the metric. local ws = game:GetService("Workspace") local map = ws:FindFirstChild("Map") local BUILDING = { Building = true, TokyoTower = true, TowerDeck = true, TowerAntenna = true, ShiodomeTower = true, TowerCrown = true, DietTower = true, RoppongiHills = true, TokyoStation = true, StationDome = true, Skytree = true, GinzaBlock = true, NationalDiet = true, BridgeTower = true, TowerCrossbeam = true, Structure = true, PalaceWall = true, } local ramp, bld = {}, {} local anyQueryOff, anyCollideOff = 0, 0 for _, d in ipairs(ws:GetDescendants()) do if d:IsA("BasePart") then if d.Name:find("PAEntryRamp") or d.Name:find("PAExitRamp") then table.insert(ramp, d) elseif BUILDING[d.Name] then table.insert(bld, d) if not d.CanQuery then anyQueryOff += 1 end if not d.CanCollide then anyCollideOff += 1 end end end end if #bld == 0 then return "NO building parts found in Workspace at all (name set wrong?)" end -- nearest building to the ramp chain (subsample ramps for speed) local bd, br, bb = math.huge, nil, nil for i = 1, #ramp, 7 do local r = ramp[i] for _, b in ipairs(bld) do local dd = (r.Position - b.Position).Magnitude if dd < bd then bd, br, bb = dd, r, b end end end -- how many buildings are anywhere near the PA at all? local cen = Vector3.new(-4128, 81, -7438) local near2000 = 0 for _, b in ipairs(bld) do if (b.Position - cen).Magnitude < 2000 then near2000 += 1 end end -- does the raw overlap API return ANYTHING for a ramp part? (metric sanity) local op = OverlapParams.new() op.MaxParts = 50 local sample = ramp[math.floor(#ramp / 2)] local hits = ws:GetPartBoundsInBox(sample.CFrame, sample.Size * 1.2, op) local hn = {} for i = 1, math.min(#hits, 8) do table.insert(hn, hits[i].Name) end return ("buildings=%d (CanQuery off=%d, CanCollide off=%d) | nearestBldToRamp=%.0f (%s -> %s @%.0f,%.0f,%.0f) | bldWithin2000ofPA=%d | overlapSanity hits=%d [%s]"):format( #bld, anyQueryOff, anyCollideOff, bd, br and br.Name or "nil", bb and bb.Name or "nil", bb and bb.Position.X or 0, bb and bb.Position.Y or 0, bb and bb.Position.Z or 0, near2000, #hits, table.concat(hn, ",") )