Edit: It seems that the Badge API is worsening, as developers have recently reported :UserHasBadgeAsync() breaking more often. This bug needs to be fixed, so please stop ignoring this and saying it’s “just a rate limit,” because it very clearly is not.
Reproduction Steps
Attempting to use the :AwardBadge() function (game:GetService(“BadgeService”):AwardBadge(UserId, BadgeId)) over 50 times stops it for 1 minute.
If you go to any badge walk place, you can see this happen.
This limit seems to be 80 per server. Awarding the same badge also counts to this limit.
This limit also seems to go away when using :AwardBadge() in Roblox Studio.
You can see the bug yourself here: 600 badges - Roblox (Step on a few of the badge awarders to see.)
This can’t be a rate limit since it works perfectly fine in Roblox Studio.
This bug also happens 100% of the time.
Using pcalls does not fix this problem either.
Expected Behavior
I expect to be awarded the badge, and not have to wait 1 minute.
Before this bug, you could award 1000+ badges in 1 minute, with multiple players.
Actual Behavior
:AwardBadge() stops when used 80 times, per server. Players might miss getting a rare badge, or any badge, in any game or something with this very harsh limit.
Even if a player already owns a badge, or the same badge is awarded, it still counts to this limit.
This can’t be a rate limit since it works perfectly fine in Roblox Studio, so I have no idea what is going on. (Videos and images below provided by @anon70976107)
Manner trying to give himself 600 badges.
Using the :AwardBadge() function almost 200 times and then getting the badge. (In Studio)
Using the :AwardBadge() function almost 200 times and then NOT getting the badge (In Game) (Badge was not owned by the way)
Issue Area: Engine Issue Type: Other Impact: Moderate Frequency: Constantly Date First Experienced: 2022-05-20 06:05:00 (-07:00) Date Last Experienced: 2023-01-27 00:01:00 (-07:00)
While others have pointed out that this may be the result of a rate limit… an 80 award limit per server is definitely not that, since servers can last for days and have hundreds or thousands of players pass through. This is impacting regular games which use the badge service for achievements (as intended), not just badge walks/badge abuse games.
Last time I earned a badge in studio, I actually received the badge. I’m not really bothered to do show proof or try it again but you can try yourself and it probably will work.
If it is a rate limit, then why is it so inconsistent? And at the very least pcalls should not say it was successful when the rate limit prevents it from getting awarded, otherwise you can simply just retry awarding the badge. At the very least I want pcalls to show as unsuccessful the “rate limit” prevents a badge from being awarded, so no badge will be missed. Just imagine a game with all the correct precautions to awarding badges just fails to give you a super rare badge. You’d be pretty annoyed, right? Of course, you could probably get around this by saving the badges you’ve earned with a datastore and then having the user be able to re-obtain them, but it would be much more convenient to just have the pcall say it failed so you can just retry awarding the badge.
Seems the RateLimit might be intentional! Although I do wish rate limits were more thoroughly documented on the documentation website.
Just like the documentation states, pcalling functions like this (and all functions that use Roblox AP) is really important. This allows you to easily track if the badge was successful or not. And if it wasn’t, you can try rewarding the badge again.
Problem is though is that :AwardBadge() never seems to error, so how are we supposed to know if a badge was successfully awarded or not, unless if we also check :UserHasBadgeAsync() after the badge has been awarded? (Which would obviously make the supposed rate limit even harsher than it is now).
Also, we’ve tried pcalls, and they didn’t seem to work.
Also if this is a rate limit and not a bug (like you say), then yes it should definitely be documented on the website, along with giving an error when the rate limit is passed so then developers can take the right precautions if a badge isn’t awarded to a Player.
The Badge Award API has practically been degrading over time and getting worse and worse, and with this could also begin to become relevant in popular games such as “Find The Chomiks,” where people might not be awarded rare badges that they took a long time to find… Roblox please fix this immediately!
These games should not be treating the badge system as storing progression data. They should store that data in data stores and then auto-award missing badges whenever the user joins the game, or have a feature for the user to re-trigger missed badges.
Even if Roblox makes it easier for games to interpret the rate limit or errors out instead of silently failing on rate limited requests, you still need something like what I describe above in case the badge system is ever down for whatever reason.
I love this because it disincentives against the stupid genre of experiences that are centered around earning a ridiculous amount of badges. I don’t think Roblox should change this limit. They should have made this change years ago.
EDIT: to be super clear, and avoid other posters putting words in my mouth, I’m talking about games where the main purpose is to award badges, i.e. ridiculous amount of badges per universe without any gameplay.
I do think they should make it easier for developers to predict when they have hit the limit and they should document what the limits are so developers can design against that.
The reason the rate limit doesn’t work in studio is because there is no requests to put the badge in your inventory. When you earn a badge in studio it just displays the notification, however, when you grant a badge in game it posts a request to add the badge in the player’s inventory which can be abused by spamming a lot of badges.
To avoid this, the rate limit exists and is a good thing.