Hello, as the title of this topic says, I would like to try how to make a text that says if the player has a bagde or not. I’ve been looking for this for a long time , but taking into account that several topics like this never end up with a solution. I would like this to have at least one
local success, hasBadge = pcall(function()
return BadgeService:UserHasBadgeAsync(player, id)
end)
if not success then
return
end
if hasBadge then
-- whatever
end
note that UserHasBadgeAsync takes two Ids as argument: player and badge
local text = script.Parent
local success, hasBadge = pcall(function()
return BadgeService:UserHasBadgeAsync(player, id)
end)
if not success then
print("error")
end
if hasBadge then
text.Text = "achieved"
else
text.Text = "not achieved"
end
Hello, well, I tried what you put, but it gives me some errors and I don’t know what to do here…
Say unknow global
And it could also be done so that it is known what bagde you have or not, since it comes out that that is achivied without even having achieved it
With the last image I want to refer to the fact that I do not have the bagde