Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to check for badge?

What lines would I use to say if a player has a badge then etc... What would the lines be to check if a player owns a badge so then I can use that in an If statement.

2 answers

BadgeId = IDHERE
 
game.Players.PlayerAdded:connect(function(p)
    if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then
        print("The user has this badge")
    else
        print("The user does not have this badge")
    end
end)

The wiki has a section on this, hopefully this can help you on what you needed to do

Badges

This discussion is preserved as it was. New answers, comments, and votes are closed.