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

How could this be fixed?

Asked by 10 years ago

I get no error for this. It's suppose to make a BoolValue true once bought. But, it does not. What am i doing wong?

Game:GetService("MarketplaceService").ProcessReceipt=function(Receipt)
local PlayerProductKey = Receipt.PlayerId.."_"..Receipt.PurchaseId
for _,Player in pairs(Game.Players:GetChildren())do
if tostring(Receipt.ProductId)== 19806398 then
    repeat wait(5) until Player:FindFirstChild("leaderstats")
    Player.SentinelChances.Value = true
    Game:GetService("DataStoreService"):GetDataStore("PurchaseHistory"):IncrementAsync(PlayerProductKey, 1)
    end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
0
What was the error? HexC3D 830 — 10y
0
If you read what i said their is no error. peoplemove12 148 — 10y

Answer this question