Hello, developers!
I want to make a value on the leaderboard that shows how many clothing purchases a player made from my Roblox group.
The problem is that my role.Value part of the code does not work and I couldn’t find a solution anywhere…
If someone could aid me or explain, I would be delighted and thankful.
Here is an example of my code:
function added(player)
local ls = Instance.new("IntValue")
ls.Name = "leaderstats"
local role = Instance.new("StringValue")
role.Name = "Purchases"
role.Value = player:GetStorePurchasesInGroup(8161349)
ls.Parent = player
role.Parent = ls
end
game.Players.PlayerAdded:connect(added)
Basically, how do I identify the amount of purchases a player has from a Roblox group through the role.Value…?
Thanks,
bulder251