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

2 comments

0

What was the error?

0

If you read what i said their is no error.