Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to check for badge?

Asked by 8 years ago

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

Log in to vote
1
Answered by 8 years ago
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)
Ad
Log in to vote
0
Answered by
yoshi8080 445 Moderation Voter
8 years ago

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

Badges

Answer this question