-- Rebuild using a CLONED module so Studio's require() cache is bypassed. -- Without this, require() returns the version compiled at first-require, -- which silently rebuilds the OLD map (symptom: PAOffRamp/PAOnRamp parts -- that exist nowhere in the current source). local sss = game:GetService("ServerScriptService") local ss = game:GetService("ServerStorage") local ws = game:GetService("Workspace") local realMod = sss:FindFirstChild("MapBuilder", true) if not realMod then return "MapBuilder not found" end local bust = ss:FindFirstChild("_cachebust") if not bust then bust = Instance.new("Folder") bust.Name = "_cachebust" bust.Parent = ss end for _, ch in ipairs(bust:GetChildren()) do ch:Destroy() end local clone = realMod:Clone() clone.Name = "MapBuilder_fresh_" .. tostring(math.random(1e6, 9e6)) clone.Parent = bust local mb = require(clone) local old = ws:FindFirstChild("Map") if old then old:Destroy() end local ok, err = pcall(function() mb.build() end) if not ok then return "BUILD ERROR: " .. tostring(err) end local map = ws:FindFirstChild("Map") if not map then return "no Map after build" end local total, entry, exit = 0, 0, 0 for _, d in ipairs(map:GetDescendants()) do if d:IsA("BasePart") then total += 1 if d.Name:find("PAEntryRamp") then entry += 1 elseif d.Name:find("PAExitRamp") then exit += 1 end end end return ("srcLen=%d parts=%d PAEntryRamp=%d PAExitRamp=%d"):format(#clone.Source, total, entry, exit)