Basically, i buy the developer product and it gives me this in the output. And it doesn’t work

Script
local MPS = game:GetService("MarketplaceService")
MPS.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1095577134 then
local goldenbox1 = game.ServerStorage:FindFirstChild("GoldenBox1")
goldenbox1:Clone().Parent = game.Workspace
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
I do not understand what you are trying to do, can you give more info?
Soo, when i buy the developer product it should spawn a crate, but it doesn’t spawn
LocalScript or regular Script?
Regular script. aaaaaaaaaaaaaaaaaaaa
Try removing the 1 from the crate variable.
that’s the name of the crate inside serverstorage
After doing this have you opened up workspace and checked if the crate is in there? If it is then the problem isn’t with this script.
Also when you purchased the item did it display an error on the player’s screen like “purchase failed” or something like that? Can you show the script that prompts the purchase just in case?
Put “return Enum.ProductPurchaseDecision.PurchaseGranted” at the end, outside the if statement.
Right when you make the purchase, open up workspace and check if the crate was actually put in there and you just can’t see it in the game, its position might be somewhere else or something. This actually happened to me before where the script worked but I thought it didn’t.
MPS.ProcessReceipt = function(receiptInfo)
local productId = receiptInfo.ProductId
local playerId = receiptInfo.PlayerId
local player = getPlayerFromId(playerId)
if productId == 1095577134 then
local goldenbox1 = game.ServerStorage:FindFirstChild("GoldenBox1")
goldenbox1:Clone().Parent = game.Workspace
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
Try this, hope it works, @shmigel12343
Ok, i just thought the problem is in the buy button i think. Here’s the script. I don’t know why Team Test only doesn’t work, in solo test works.
MPS = game:GetService("MarketplaceService")
id = 1095577134
local player = game.Players.LocalPlayer
local gui = script.Parent.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
MPS:PromptProductPurchase(player, id)
gui:Remove()
end)
Does it work in a normal server? Aka not in Studio?
let me try aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
… we wasted all time… it works in normal servers
Well then, if you have found your solution, mark it as a solution.