#Too Many Requests and UserHasBadgeAsync: failed due to empty response

6 messages · Page 1 of 1 (latest)

flat wraith
#

this is what the script looks like:

#
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local BadgeService = game:GetService("BadgeService")

local targetBadgeId = ReplicatedStorage.Badges[script.Parent.Name].Value

local frame = script.Parent

frame.name.Text = script.Parent.Name
frame["Egg Image"].Image = ReplicatedStorage.Images[script.Parent.Name].Image

local function checkBadge(player)
    if player then
        if BadgeService:UserHasBadgeAsync(player.UserId, targetBadgeId) then
            frame.BackgroundColor3 = Color3.new(0, 1, 0)
            frame.Status.Text = "Discovered"
        else
            frame.BackgroundColor3 = Color3.new(1, 0, 0)
            frame.Status.Text = "Undiscovered"
        end
    end
end

local function continuousCheck()
    while task.wait(5) do
        local localPlayer = Players.LocalPlayer
        checkBadge(localPlayer)
    end
end

localPlayer = Players.LocalPlayer
checkBadge(localPlayer)

continuousCheck()

#

Please ping me with any solution

gusty steeple
#

use for loop PLS

flat wraith
#

The ai helped to fix it

runic sageBOT
#

studio** You are now Level 1! **studio