-- probe 3: who writes the camera last (render priority race) local RS = game:GetService("RunService") local cam = workspace.CurrentCamera local T = getgenv().TribesOverlay local lp = game:GetService("Players").LocalPlayer local N = 120 local S = { last1 = {}, p3000 = {}, p4000 = {}, rs = {}, plain = {}, heart = {} } local function rec(list, tag) return function() local p = cam.CFrame.Position list[#list + 1] = { y = p.Y, x = p.X, z = p.Z, lookY = cam.CFrame.LookVector.Y } end end -- probe at Last.Value + 1 RS:BindToRenderStep("camprobe_last1", Enum.RenderPriority.Last.Value + 1, rec(S.last1, "last1")) local ok3000 = pcall(function() RS:BindToRenderStep("camprobe_3000", 3000, rec(S.p3000, "p3000")) end) local ok4000 = pcall(function() RS:BindToRenderStep("camprobe_4000", 4000, rec(S.p4000, "p4000")) end) print("bind3000 ok=", ok3000, " bind4000 ok=", ok4000) print("Last.Value =", Enum.RenderPriority.Last.Value, "Camera.Value =", Enum.RenderPriority.Camera.Value) local rsConn = RS.RenderStepped:Connect(rec(S.rs, "rs")) local heartConn = RS.Heartbeat:Connect(rec(S.heart, "heart")) task.spawn(function() for i = 1, N do local p = cam.CFrame.Position S.plain[#S.plain + 1] = { y = p.Y, x = p.X, z = p.Z, lookY = cam.CFrame.LookVector.Y } task.wait() end end) task.wait(N / 60 + 1.5) rsConn:Disconnect() heartConn:Disconnect() pcall(function() RS:UnbindFromRenderStep("camprobe_last1") end) pcall(function() RS:UnbindFromRenderStep("camprobe_3000") end) pcall(function() RS:UnbindFromRenderStep("camprobe_4000") end) local function stats(name, list) if #list == 0 then print(name, "EMPTY") return end local mn, mx, sum = math.huge, -math.huge, 0 local haveSky = 0 for _, s in ipairs(list) do mn = math.min(mn, s.y); mx = math.max(mx, s.y); sum = sum + s.y if s.y > 100 then haveSky = haveSky + 1 end end local l = list[#list] print(string.format("%-8s n=%3d minY=%.2f maxY=%.2f avgY=%.2f lastY=%.2f skyFrames=%d last=%.2f,%.2f,%.2f lookY=%.3f", name, #list, mn, mx, sum / #list, l.y, haveSky, l.x, l.y, l.z, l.lookY)) end stats("last1", S.last1) stats("p3000", S.p3000) stats("p4000", S.p4000) stats("rs", S.rs) stats("plain", S.plain) stats("heart", S.heart) local hrp = lp.Character and lp.Character:FindFirstChild("HumanoidRootPart") print("rootY", hrp and hrp.Position.Y) print("appliedOffset", tostring(T.STATE.appliedOffset), "invisHeld", tostring(T.STATE.invisHeld)) print("cameraStepOff", tostring(T.STATE.cameraStepOff), "cameraStepFails", tostring(T.STATE.cameraStepFails))