-- The require sweep passing only proves the modules LOAD. What runs on Play is -- MapBuilder actually building. Execute it for real and capture the error. local SS = game:GetService("ServerScriptService") local out = {} local function say(s) table.insert(out, s) end local serverScript = SS:FindFirstChild("Server") local mb for _, d in ipairs(SS:GetDescendants()) do if d:IsA("ModuleScript") and d.Name == "MapBuilder" then mb = d end end say("MapBuilder module: " .. (mb and mb:GetFullName() or "NOT FOUND")) if not mb then return table.concat(out, "\n") end local ok, mod = pcall(require, mb) say("require: " .. (ok and "ok" or ("FAIL " .. tostring(mod)))) if not ok then return table.concat(out, "\n") end say("exports: " .. type(mod)) if type(mod) == "table" then local keys = {} for k, v in pairs(mod) do table.insert(keys, ("%s(%s)"):format(tostring(k), type(v))) end table.sort(keys) say(" " .. table.concat(keys, ", ")) end -- Clear any existing map so we build from scratch, exactly like a fresh run. local existing = workspace:FindFirstChild("Map") say("existing Map in workspace: " .. (existing and "yes" or "no")) local buildFn = type(mod) == "table" and (mod.Build or mod.build or mod.BuildMap) if type(buildFn) ~= "function" then say("NO BUILD FUNCTION EXPORTED -- cannot test build path") return table.concat(out, "\n") end if existing then existing:Destroy() end local t0 = os.clock() local bok, berr = pcall(buildFn) local dt = os.clock() - t0 say(("build pcall: %s (%.2fs)"):format(bok and "OK" or "FAIL", dt)) if not bok then say("BUILD ERROR: " .. tostring(berr):sub(1, 600)) return table.concat(out, "\n") end local m = workspace:FindFirstChild("Map") say("Map after build: " .. (m and "present" or "MISSING")) if m then local n = #m:GetDescendants() say("descendants: " .. n) if n == 0 then say("CONTROL FAIL: map built but empty") end end return table.concat(out, "\n")