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 I seem to fail doing that, I am stuck on the part as to how to check how many clothing purchases a player made from the group and to display it on the leaderboard.
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:GetStorePurchasesInGroup8161349)
ls.Parent = player
role.Parent = ls
end
game.Players.PlayerAdded:connect(added)
So I guess the main problem is how do I identify the store purchases from a player in a group?
Thanks,
bulder251
role.Value = player:GetStorePurchasesInGroup(8161349)
But it did not work, how do I make the value of the role be the amount of purchases a player has from a certain group?