I made a developer product code. The GUI screen works good but not the buying system. The Roblox buying screen did show up but not my leaderboard stats> Here's the code
Marketplaceservice.ProcessReceipt = function(receiptinfo)
for i, Player in ipairs(game:GetChildren()) do
if Player.UserId == receiptinfo.PlayerId then
if receiptinfo.ProductId == devid then
Player.leaderstats.Coins.Value = Player.leaderstats.Coins.Value + 1000
end
end
end
end
In the output, it said UserId is not a valid member of Workspace also it's clearly seen here that UserId is a member of Player, as shown on Roblox Dev Page: https://developer.roblox.com/api-reference/property/Player/UserId Can anyone fix this? Thanks! P/S: I have FE enabled

1 comment
It worked thanks!