The script is supposed to award the badge when a stat becomes a certain value. However, it is not working, and I have no idea why. Can someone please help me?
Script:
local BadgeID = 238037695
local Cash = "Friends"
game.Players.PlayerAdded:connect(function(p)
repeat wait() until p:findFirstChild("Friends") ~= nil
p[Cash].Changed:connect(function()
if p[Cash].Value == 1 then return end
game:GetService("BadgeService"):AwardBadge(p.userId, BadgeID)
end)
end)

2 comments
Can you provide an error message?
That involves the Dev GUI, right?