Hi guys! Any ideas why this badge is not working? Thanks!
leaderstat = "Coins" amount = 10000 badgeID = 2170455021 game['Players'].PlayerAdded:connect(function(player) repeat wait() until player:findFirstChild([[leaderstats]]) if player['leaderstats'][leaderstat].Value >= amount then game['BadgeService']:AwardBadge(player.userId, badgeID) end end)
local LeaderboardString = "Coins" local RequiredValue = 10000 local BadgeID = 2170455021 Game.Players.PlayerAdded:connect(function(Player) local LeaderboardInstance = Player:WaitForChild(LeaderboardString) if LeaderboardInstance.Value >= RequiredValue then Game:GetService("BadgeService"):AwardBadge(Player.userId, BadgeID) end end)