Maybe I’m missing something but I can’t find anything on the DevForum or Google to display all of my game’s badges. I’ve made a template GUI, I just need the method to loop through all of them. Surely there is a way to do it without hardcoding in all of the badges?
I mean, dpending on what you want to do and consider hardcoding, you could store a table with all your Badge IDs and then loop through them using the Badge Service’s :GetBadgeInfoAsync(id)
. I don’t know if there is a way to get all of your badge ids without hardcoing or putting them into a table and looping through (unless :GetChildren() somehow magically achieves that).
GetBadgeInfoAsync() is what I think you’re looking for. The parameter for this function is the badgeId. It’s a function of BadgeService
As I said in the original post, is there a way to do it without hardcoding that I didn’t see? I’m aware of using BadgeService from that point.
I mean, what does BadgeService:GetChildren() return? If it returns the game’s badges then that would be your solution; otherwise I don’t believe there is an option.
BadgeService:GetChildren()
returns an empty table, as expected. Looks like I’ll have to stick to hardcoding it. That’s a shame.