UserId is not a valid member of Workspace?
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
01 | Marketplaceservice.ProcessReceipt = function (receiptinfo) |
02 | for i, Player in ipairs (game:GetChildren()) do |
03 | if Player.UserId = = receiptinfo.PlayerId then |
04 | if receiptinfo.ProductId = = devid then |
05 | Player.leaderstats.Coins.Value = Player.leaderstats.Coins.Value + 1000 |
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