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

Trying to award a badge based on leaderboard stats. Any ideas to fix?

Asked by 3 years ago

Hello, I am trying to make some code that awards a badge based on a leaderboard stats. Basically, if someone gets 5 minutes into their leaderboard status, they get a badge.

I've put this script into ServerScriptService, and I haven't got any error message saying where I've messed up. I need help please, thanks.


game.Players.PlayerAdded:Connect(function(test) local stats = Instance.new("Folder") stats.Name = "leaderstats" stats.Parent = test local minutes = Instance.new("IntValue") minutes.Name = "Minutes" minutes.Parent = stats minutes:GetPropertyChangedSignal("Value"):Connect(function() print("Changed") if minutes.Value >= 5 then -- This is the amount of minutes I want the badge to be rewarded in. game:GetService("BadgeService"):AwardBadge(test.UserId,2124612890) end end) end)
0
Are you chaning the [minutes] value? Does it print [Changed]? We can't know, you should post more details. imKirda 4491 — 3y

Answer this question