502: API Services rejected request with error. HTTP unknown error (HttpError: Timedout)
local PrestigeODS = game:GetService("DataStoreService"):GetOrderedDataStore("Prestige") local function Handler() local Success, Err = pcall(function() local Data = PrestigeODS:GetSortedAsync(false, 15) local PrestigePage = Data:GetCurrentPage() for Rank, Data in ipairs(PrestigePage) do local Name = Data.key local Prestige = Data.value local NewObj = game.ReplicatedStorage:WaitForChild("lbFrame"):Clone() NewObj.Player.Text = Name NewObj.TotalWheat.Text = Prestige NewObj.Rank.Text = "#"..Rank NewObj.Position = UDim2.new(0, 0, NewObj.Position.Y.Scale + (0.08 * #game.Workspace.Leaderboards.PrestigeLeaderboard.lbGUI.Holder:GetChildren()), 0) NewObj.Parent = game.Workspace.Leaderboards.PrestigeLeaderboard.lbGUI.Holder end end) if not Success then error(Err) end end while true do for _,Player in pairs(game.Players:GetPlayers()) do PrestigeODS:SetAsync(Player.Name, Player.leaderstats.Prestiges.Value) end for _,v in pairs(game.Workspace.Leaderboards.PrestigeLeaderboard.lbGUI.Holder:GetChildren()) do if v.Name == "lbFrame" then v:Destroy() end end Handler() wait(20) end