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

Does if PlayerHasBadge Work?

Please help!

BadgeNoise = game.Workspace.BadgeAward

if PlayerHasBadge = "badge id here"
	BadgeNoise:Play()
end

1 comment

2

That is not remotely close to being correct.

1 answer

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.

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