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

How to see if a player has a badge?

Asked by
lucas4114 607 Moderation Voter
9 years ago

So, what code would I use tp see if a player has a badge?

if --player has badge thingy??? help?
    --my stuff goes here
end

1 answer

Log in to vote
5
Answered by
woodengop 1134 Moderation Voter
9 years ago

If you want to see if a player has a badge then we use the UserHasBadge method, Example script:


Badge=IDHERE

game.Players.PlayerAdded:connect(function(p)
    if game:GetService("BadgeService"):UserHasBadge(p.userId, Badge) then
        --code
    end
end)
Ad

Answer this question