-- probe 5: analyse user's log + find true floor height local out = {} local function add(k, v) table.insert(out, tostring(k).." = "..tostring(v)) end local LP = game:GetService("Players").LocalPlayer local cam = workspace.CurrentCamera local T = getgenv().TribesOverlay -- parse log local ok, log = pcall(function() return readfile("invis_cam_log.txt") end) local lines = {} if ok then for l in tostring(log):gmatch("[^\n]+") do lines[#lines+1] = l end end add("log lines", #lines) for i = 1, math.min(15, #lines) do add("head"..i, lines[i]) end add("...", "") for i = math.max(1, #lines-8), #lines do add("tail"..i, lines[i]) end -- find extreme camClean and camY local minClean, maxClean, minCamY, maxCamY = math.huge, -math.huge, math.huge, -math.huge local weird = 0 for _, l in ipairs(lines) do local rootY = tonumber(l:match("rootY=(-?[%d%.]+)")) local camY = tonumber(l:match("camY=(-?[%d%.]+)")) local cc = tonumber(l:match("camClean=(-?[%d%.]+)")) if rootY then minClean = math.min(minClean, rootY) maxClean = math.max(maxClean, rootY) end if camY then minCamY = math.min(minCamY, camY) maxCamY = math.max(maxCamY, camY) end if cc and math.abs(cc) > 20 then weird = weird + 1 end end add("rootY range", string.format("%.1f .. %.1f", minClean, maxClean)) add("camY range", string.format("%.1f .. %.1f", minCamY, maxCamY)) add("lines with |camClean|>20", weird) -- true floor: raycast straight down from high above the character local rp = RaycastParams.new() rp.FilterType = Enum.RaycastFilterType.Exclude rp.FilterDescendantsInstances = { LP.Character, cam } local function floorAt(x, z, fromY, wantName) local r = workspace:Raycast(Vector3.new(x, fromY, z), Vector3.new(0, -(fromY + 2000), 0), rp) if r then return string.format("%s hit %s(%s) at Y=%.1f dist=%.1f", wantName, r.Instance.Name, r.Instance.ClassName, r.Position.Y, r.Distance) end return wantName .. " no hit" end local hrp = LP.Character and LP.Character:FindFirstChild("HumanoidRootPart") local x, z = hrp and hrp.Position.X or 0, hrp and hrp.Position.Z or 0 add("char pos", hrp and tostring(hrp.Position)) add(floorAt(x, z, 1000, "floor-under-char")) add(floorAt(0, 0, 1000, "floor-at-origin")) add(floorAt(x, z, -1000, "floor-below-clean")) -- up from clean: what is above clean? local clean = hrp and (hrp.Position.Y - (T.STATE.appliedOffset.Y or 0)) or 0 add("overlay cleanY", string.format("%.1f", clean)) add(floorAt(x, z, clean + 3, "floor-from-clean+3")) -- raycast from camera forward local camOr = cam.CFrame.Position local camHit = workspace:Raycast(camOr, cam.CFrame.LookVector * 500, rp) add("cam forward 500", camHit and (camHit.Instance.Name.." ("..camHit.Instance.ClassName..") dist="..string.format("%.1f", camHit.Distance).." atY="..string.format("%.1f", camHit.Position.Y)) or "no hit") -- sky root in frustum? if hrp then local sp, onScreen = cam:WorldToViewportPoint(hrp.Position) add("skyRoot WorldToViewportPoint", tostring(sp).." onScreen="..tostring(onScreen)) end add("cam pos", tostring(camOr)) add("camType", tostring(cam.CameraType)) add("camSubject==Humanoid", tostring(cam.CameraSubject == LP.Character:FindFirstChildOfClass("Humanoid"))) -- drawn body parts local drawn = cam:FindFirstChild("TribesDrawnBody") add("TribesDrawnBody", tostring(drawn ~= nil)) if drawn then local t = {} for _, p in ipairs(drawn:GetDescendants()) do if p:IsA("BasePart") then t[#t+1] = string.format("%s=%.1f", p.Name, p.Position.Y) end end add("drawn part Ys", table.concat(t, " ")) end print(table.concat(out, "\n"))