GUYS I NEED HELP!
-
What do you want to achieve? I have many developer products in my game and THIS SINGLE ONE WILL NOT WORK. I need it to work.
-
What is the issue? 1/13 Developer products in my game WILL NOT WORK.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? yes. This one developer product WILL NOT WORK!!!
SERVER:
local coins = 1598346890
local mps = game:GetService("MarketplaceService")
mps.ProcessReceipt = function(info)
print("detect")
local productId = info.ProductId
local plrId = info.PlayerId
local plr = game.Players:GetPlayerByUserId(plrId)
if productId == coins then
print("product bought")
plr.mainData.Coins.Value += 100
plr:LoadCharacter()
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
CLIENT:
local assetId = 1598346890
local mps = game:GetService("MarketplaceService")
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
mps:PromptProductPurchase(plr, assetId)
end)
PLEASE NOTE THAT THE VALUE TO UPDATE IS IN A FOLDER CALLED MAINDATA INSIDE THE PLAYER. COULD THAT BE THE ISSUE?
DEVELOPER FOURM MODERATORS: I AM AWARE I HAVE MADE TOPICS LIKE THIS ONE BUT I REALLY NEED HELP AND NOBODY IS RESPONDING. I CANNOT FIND ANYTHING ON THE DEVFOURM, ON YOUTUBE, OR DOCCUMENTATION. PLEASE HELP ME. THANK YOU.