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

Does if PlayerHasBadge Work? [closed]

Asked by 9 years ago

Please help!

BadgeNoise = game.Workspace.BadgeAward

if PlayerHasBadge = "badge id here"
    BadgeNoise:Play()
end
2
That is not remotely close to being correct. BlueTaslem 18071 — 9y

Closed as Not Constructive by M39a9am3R, Tkdriverx, and adark

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
SurVur 86
9 years ago

You have to use the BadgeService.

BadgeNoise = game.Workspace.BadgeAward
bservice = game:GetService("BadgeService")
if bservice:UserHasBadge(userId, badgeId) then
    BadgeNoise:Play()
end

You can also use the BadgeService to detect if the player has any asset, such as tshirts, hats, models, etc.

Ad