BadgeService¶
Provides information on badges and awards them.
Description¶
BadgeService provides information and functionality related to
badges. Badges are used across the
platform to recognize a player's achievements and activity. Upon awarding a
badge to a player, it is added to their inventory and displayed on their
profile page.
Inheritance¶
Object → Instance → BadgeService
Nova inheritance: Instance → BadgeService
Methods¶
AwardBadge Supported Function Deprecated Award a badge to a player given the ID of each.
Award a badge to a player given the ID of each.
IsDisabled Supported Function Deprecated Returns whether a given badge is disabled.
Returns whether a given badge is disabled.
This function returns whether the badge with the given ID is marked disabled on the Roblox website. A badge can be disabled by its owner on its page on the Roblox website, in the settings sub-menu. When a badge is disabled, this function returns true and the badge can no longer be awarded. A badge may be quickly re-enabled through the same menu.
In Studio, a badge can only be tested if it is disabled. Calling this function with an enabled badge in Studio will return true and produce a warning "Sorry, badges can only be tested if they are disabled on Roblox game servers".
Note that even if a badge is enabled it may not necessarily be awardable (for example if it isn't associated with the current game).
Badges that are associated with special events are a common reason for a badge to be disabled. Often, it is easier to simply disable a badge instead of hard-coding a time check for when some event ends.
IsLegal Supported Function Deprecated Determines if a given badge is associated with the current game.
This function determines if a given badge is associated with the current game. It returns true if the badge is associated with the current game.
Badges can only be awarded from a place that is part of the game associated with the badge. This means, for example, a developer cannot award a badge associated with another developer's game.
Even if this returns true, a badge may still not be award-able. For example, it may be disabled.
SetAwardBadgeUrl Supported Function
No description available.
LocalUserSecuritySetHasBadgeCooldown Supported Function
No description available.
LocalUserSecuritySetHasBadgeUrl Supported Function
No description available.
LocalUserSecuritySetIsBadgeDisabledUrl Supported Function
No description available.
LocalUserSecuritySetIsBadgeLegalUrl Supported Function
No description available.
LocalUserSecuritySetPlaceId Supported Function
No description available.
LocalUserSecurityUserHasBadge Supported Function Deprecated Checks whether a user has the badge given the Player.UserId and the badge ID.
Checks whether a user has the badge given the Player.UserId and the badge ID.
Checks and returns whether a Player owns a badge given their UserId and the badge ID. You can call the function from a server script or a ModuleScript eventually required by one. When calling the method from a client script (a LocalScript or a Script with RunContext of RunContext.Client), it only works for the local user whose client is running the script.
When called from a server script, any UserId can be used. If the user with the target user ID has not recently been in the server, only badge IDs that are associated with the requesting experience will be checked. If the requested badge ID is not associated with the requesting experience and the target user has not recently been in the server, the method behaves as if the badge is not owned.
For users that have recently been in the server, any badge for any experience can be queried, no matter who created the badge or which experience it is used for.
UserHasBadgeAsync Supported Function Checks whether a player has the badge given the Player.UserId and the badge ID.
Checks whether a player has the badge given the Player.UserId and the badge ID.
Checks and returns whether a Player owns a badge given their UserId and the badge ID. You can call this method from a server script or a ModuleScript eventually required by one. When calling this method from a client script (a LocalScript or a Script with RunContext of RunContext.Client), it only works for the local user whose client is running the script.
When called from a server script, any UserId can be used. If the user with the target user ID has not recently been in the server, only badge IDs that are associated with the requesting experience will be checked. If the requested badge ID is not associated with the requesting experience and the target user has not recently been in the server, the method behaves as if the badge is not owned.
For users that have recently been in the server, any badge for any experience can be queried, no matter who created the badge or which experience it is used for.
Rate limit is 50 + 35 * [number of players] per minute.
Events¶
BadgeAwarded Supported Event
No description available.
RobloxScriptSecurityInherited members¶
Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.
5 modern Roblox member(s) are not implemented yet — expand to inspect
Members declared by Roblox's BadgeService class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.
Methods¶
| Member | Signature | Status | Notes | Flags |
|---|---|---|---|---|
AwardBadgeAsync |
BadgeService:AwardBadgeAsync(userId: User, badgeId: int64): bool |
Not yet | Award a badge to a player given the ID of each. | Yields |
CheckUserBadgesAsync |
BadgeService:CheckUserBadgesAsync(userId: User, badgeIds: Array): Array |
Not yet | Checks a list of badge IDs against a UserId and returns a list of badge IDs that the player owns. | Yields |
GetBadgeInfoAsync |
BadgeService:GetBadgeInfoAsync(badgeId: int64): Dictionary |
Not yet | Fetch information about a badge given its ID. | Yields |
GetUserBadgesAsync |
BadgeService:GetUserBadgesAsync(userId: User, badgeIds: Array): Array |
Not yet | Checks a list of badge IDs against a User and returns, for each badge the player owns, its ID and the date it was awarded. | Yields |
Events¶
| Member | Signature | Status | Notes | Flags |
|---|---|---|---|---|
OnBadgeAwarded |
OnBadgeAwarded(userId: int64, creatorId: int64, badgeId: int64) |
Not yet | — | RobloxScriptSecurity |
Roblox reference: BadgeService
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.