I have no idea but dev products aren’t being constant. Sometimes it works and sometimes it doesn’t. My script doesn’t error at all and this is getting REALLY annoying. Edit [Now Only One Of Them Is Working And The Other Isn’t! Edit2 [ERROR: ReceiptId d8b449a800cbec8b96eced2ba9faff15 already being processed.]
kind of hard to help you when theres no code or anything we can review
Ok. The code isn’t even the issue ()_() Its literally not a code. Half of the time it works, half it doesnt.
local MarketPlace = game:GetService(“MarketplaceService”)
MarketPlace.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1146971176 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local players = game:GetService("Players"):GetPlayers()
local Tank = game.ReplicatedStorage.TankSpawn.Tank:Clone()
Tank.Parent = game.Workspace.Cars
wait(7)
Tank:Destroy()
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
try this
local MarketPlace = game:GetService(“MarketplaceService”)
MarketPlace.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1146971176 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local Tank = game.ReplicatedStorage.TankSpawn.Tank:Clone()
Tank.Parent = game.Workspace.Cars
spawn(function()
wait(7)
Tank:Destroy()
end)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
What is the difference? What is a spawn function…
Yup doesnt work doesnt error. Everything is correct i checked so much.
do you have ProcessReceipt anywhere else, even in another script? you can only do ProcessReceipt once
There are two dev products and its a 50/50 chance that 1 will work. Its always switching.
local id = 1146971176
local mps = game:GetService(“MarketplaceService”)
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
mps:PromptProductPurchase(plr, id)
end)
send the code for the other dev product. (with processreceipt) thats why it wont work. i had the same problem years ago and thats how i fixed it
Other Script: local id = 1147043854
local mps = game:GetService(“MarketplaceService”)
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
mps:PromptProductPurchase(plr, id)
end)
Second “other” script:
local MarketPlace = game:GetService(“MarketplaceService”)
MarketPlace.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1147043854 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local players = game:GetService("Players"):GetPlayers()
local Tank = game.ReplicatedStorage.BankVan:Clone()
Tank.Parent = game.Workspace.Cars
local Money = game.ReplicatedStorage.MoneyStacks:Clone()
Money.Parent = game.Workspace
wait(7)
Tank:Destroy()
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
Wdym. Please just send me to fix script… /: Im so confused. Process script? Doesn’t mine have one?
local MarketPlace = game:GetService("MarketplaceService")
MarketPlace.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1146971176 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local Tank = game.ReplicatedStorage.TankSpawn.Tank:Clone()
Tank.Parent = game.Workspace.Cars
spawn(function()-- create a new thread so wait(7) doesnt interupt anything else in the script
wait(7)
Tank:Destroy()
end)
return Enum.ProductPurchaseDecision.PurchaseGranted
elseif receiptInfo.ProductId == 1147043854 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local players = game:GetService("Players"):GetPlayers()
local Tank = game.ReplicatedStorage.BankVan:Clone()
Tank.Parent = game.Workspace.Cars
local Money = game.ReplicatedStorage.MoneyStacks:Clone()
Money.Parent = game.Workspace
spawn(function()-- create a new thread so wait(7) doesnt interupt anything else in the script
wait(7)
Tank:Destroy()
end)
return Enum.ProductPurchaseDecision.PurchaseGranted
else
return Enum.ProductPurchaseDecision.NotProcessedYet
end
end
just please be patient lol i dont type at 500 WPM
No no, thank you. I am really mad today so ik Im a bit hard to deal with. Idk why computers make me mad.
Do you have multiple products in different scripts? If so then they all must be together in one script otherwise it will be inconsistent as you have stated.
My script is glitching again.
local MarketPlace = game:GetService(“MarketplaceService”)
MarketPlace.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1148820865 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local Tank = game.ReplicatedStorage.TankSpawn.Tank:Clone()
Tank.Parent = game.Workspace.Cars
plr.Character.Humanoid.MaxHealth = 101
plr.Character.Humanoid.Health = 101
for i,v in pairs (game.Players:GetChildren()) do
v.Character.Humanoid.Health -= 100
end
plr.Character.Humanoid.Health = 100
plr.Character.Humanoid.MaxHealth = 100
spawn(function()-- create a new thread so wait(7) doesnt interupt anything else in the script
wait(7)
Tank:Destroy()
end)
return Enum.ProductPurchaseDecision.PurchaseGranted
else
return Enum.ProductPurchaseDecision.NotProcessedYet
end
end
local MarketPlace = game:GetService(“MarketplaceService”)
MarketPlace.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1148820865 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local Tank = game.ReplicatedStorage.TankSpawn.Tank:Clone()
Tank.Parent = game.Workspace.Cars
plr.Character.Humanoid.MaxHealth = 101
plr.Character.Humanoid.Health = 101
for i,v in pairs (game.Players:GetChildren()) do
v.Character.Humanoid.Health -= 100
end
plr.Character.Humanoid.Health = 100
plr.Character.Humanoid.MaxHealth = 100
spawn(function()-- create a new thread so wait(7) doesnt interupt anything else in the script
wait(7)
Tank:Destroy()
end)
return Enum.ProductPurchaseDecision.PurchaseGranted
else
return Enum.ProductPurchaseDecision.NotProcessedYet
end
end Whats wrong with the script…
Could you put ``` in front and behind of the script so it is easier to read and so I can help you easier?
Also, could you tell me what exactly is wrong with it? It isn’t doing a certain thing, or throwing and error, or just plain not working?