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 9 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 9 years ago
1BadgeId = IDHERE
2 
3game.Players.PlayerAdded:connect(function(p)
4    if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then
5        print("The user has this badge")
6    else
7        print("The user does not have this badge")
8    end
9end)
Ad
Log in to vote
0
Answered by
yoshi8080 445 Moderation Voter
9 years ago

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

Badges

Answer this question