As a Roblox developer, it is currently impossible to know the Rarity of a badge efficiently at runtime in-game.
I am implementing an achievement listing system into my game that lists every badge from the game that the user has. I’m doing this by using UserHasBadgeAsync. I then use GetBadgeInfoAsync to get details on the badge (name, description, image). However, as much as I’d like to list how rare the achievement is or be able to determine an amount of xp to award the player from how difficult a certain badge is based on its Rarity, I can’t, because there is no way of knowing it’s Rarity in-game.
I propose adding the Rarity property as a percentage numeric value into the return of the GetBadgeInfoAsync function of the BadgeService.