The Ask
As a Roblox developer, it is currently too hard to detect when a player receives a badge with :AwardBadge().
I would like an event that lets me listen and react to when a player receives a badge.
In fact, such an event already exists! But it can only be accessed by CoreScripts.
The Reason
When a badge is awarded, I currently have the following options:
-
Directly implement what I want to happen in every script where I call :AwardBadge(). This requires a lot of effort and the implementation is pretty messy. I would not recommend doing this.
-
Create a custom module that I call in every script where I want to award a badge. Use a BindableEvent to send an event out to the server. React to this in a central listener script. This requires a decent amount of effort, but it is way more organized. It is extremely redundant in firing what is essentially a recreation of an pre-existing inaccessible event.
-
Don’t react to badges at all. No effort required. My world feels less alive as a result.
There’s probably a few more workarounds, but they boil down into using custom implementation EVERY time I award a badge. Sometimes these are handled in numerous scripts and modules - this gets pretty messy when making reusable components between experiences.
I would really like the ability to listen to an event that’s already fired when I award a badge. It’s much cleaner, convenient, scalable, and straightforward.
Use Cases
I’ve already described how I implement the needed functionality, but here are a few specific use cases:
- Saving awarded badges in a player’s DataStore (this system is necessary to avoid bulk badge querying)
- Celebration FX around the player when they receive a badge
- A custom chat message mentioning a player received a badge
- Teleporting a player to another place/experience once they earn a badge
Hopefully these highlight how frustrating it can be to put all the logic together. They’re all pretty unique, which makes reusability annoying.
Precedent
A great example are the events for ProximityPromptService. Yes, all of this logic could be handled with a custom module - but it isn’t. Why? It’s a lot more convenient and clean to listen to an event.
Conclusion
If Roblox is able to address this issue, it would improve my development experience because I would be able to react to players earning badges more efficiently. I would be able to create more immersive and reactive experiences as a result.