BadgeService links incorrect method for checking possession of badges

https://developer.roblox.com/api-reference/class/BadgeService

Excerpt:

You can also check if a player already earned a badge using AwardBadge .

AwardBadge is not used to check if a player owns a badge, UserHasBadgeAsync is.

That being said, while the correction is still up in the air to be made, I feel like including that or the paragraph above it would make its presence redundant. It would be in the mentions of asynchronous calls on the third paragraph, then once again explaining its function on the fourth.

Current content excerpt:

While theoretically you can check if a user owns a badge from AwardBadge’s return value, that wouldn’t be good practice. Users who don’t own the badge would then receive the badge and there are several other conditions which can result in AwardBadge returning false (unsuccessfully awarded) besides already owning the badge.

3 Likes

Still a problem - BadgeService documentation recommends using the incorrect function to check for badge ownership, which can lead to misconceptions and bad practice. Achievements are still very relevant in games of all kinds right now.

Although you can see which function is the right one to use with a quick skim of the page, updating it for the sake of new developer access would be great.

Thanks for the report, this has been fixed now! https://developer.roblox.com/en-us/api-reference/class/BadgeService

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.