Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

the game thinks I have a badge even though I don't have it?

Asked by 1 year ago

No errors, no warnings, the console isn't acting up, and it's placed in server script service in a normal script. However, my badge checker is STILL not working. It stilll teleports me, even though I don't have the first badge? Here's my script:

bs = game:GetService("BadgeService")
game.Players.PlayerAdded:Connect(function(p)
    print(bs:UserHasBadge(p.UserId, 2126667387))
    if bs:UserHasBadge(p.UserId, 2126667387) then
        if bs:UserHasBadge(p.UserId, 2126673674) then
            workspace.Thing:Destroy()
        else
            local tp = game:GetService("TeleportService")
            tp:TeleportAsync(9798527432, {p})
        end
    end
end)
0
What value does `bs:UserHasBadge(p.UserId, 2126667387)` and `bs:UserHasBadge(p.UserId, 2126673674)` return? ScriptGuider 5640 — 1y
0
Explain a bit more about your code. I may be able to help you. fiddyfiddler 18 — 1y
0
UserHasBadge is deprecated, use UserHasBadgeAsync instead. https://developer.roblox.com/en-us/api-reference/function/BadgeService/UserHasBadgeAsync Miniller 562 — 1y

Answer this question