Hi There!
So i make a LocalScript to make a Developer Product
Local Script:
local productId = 1156283046
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)
local MarketplaceService = game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == productId then
player.leaderstats.Coin.Value = player.leaderstats.Coin.Value + 1000
end
end
end
local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.ProductId
ds:IncrementAsync(playerProductKey, 1)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
The ID is Correct
It wont work!
The output say: 20:26:17.366 DataStore can't be accessed from client - Client - LocalScript:9
Can Someone Help Me?
Thank's for Reading!

1 comment
Sorry i forgot to accept :P