Script
, the awardBadge()
function can be called whenever it fits your game design. Using properties of the badge fetched via BadgeService/GetBadgeInfoAsync|BadgeService:GetBadgeInfoAsync()
, it confirms that the badge can be awarded and does so using BadgeService/AwardBadge|BadgeService:AwardBadge()
.badgeId
parameter, right-click the badge's name in the Badges tree within the Game Explorer and select Copy ID to Clipboard.articles/Collision Filtering Team Doors|restricted area
or articles/Teleporting Between Places|teleporter
that only works if a player owns a special badge.BadgeService/GetBadgeInfoAsync|BadgeService:GetBadgeInfoAsync()
function as illustrated in the following example.