No I don’t. That is the only one
I’ll try that right now. There is no other callbacks no.
I tried that, and identified the button part correctly. Again the purchase prompt comes up fine but once the purchase is completed, nothing happened.
Is anything being outputted into the console? Errors, prints, warnings, anything related to this?
No nothing in the console, check client and server
Right now you did it so the button can only prompt a purchase and a script in ServerScriptService to handle the transactions? May I see both of the scripts?
Try putting the code that handles prompting in the part and keeping the processreceipt code in serverscriptservice, so in the button you have
--Services--
local MarketplaceService = game:GetService("MarketplaceService")
--Integer Defintions--
local AssetID = 1153097919
--Objects--
local Part = script.Parent
local ClickDetector = Part.ClickDetector
--Events--
ClickDetector.MouseClick:Connect(function(Player)
MarketplaceService:PromptProductPurchase(Player, AssetID)
end)
And in the script in ServerScriptService you have
--Services--
local MarketplaceService = game:GetService("MarketplaceService")
--Integer Defintions--
local AssetID = 1153097919
local function info(receiptInfo)
print("le swo")
if receiptInfo.ProductId == AssetID then
for _,v in pairs(workspace.ConfettiParts:GetDescendants()) do
if v:IsA("ParticleEmitter") then
v.Enabled = true
end
end
wait(15)
for _,v in pairs(workspace.ConfettiParts:GetDescendants()) do
if v:IsA("ParticleEmitter") then
v.Enabled = false
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketplaceService.ProcessReceipt = processReceipt
Sorry for being late, had some classes to attend to. I tried that and it did not work. MarketplaceService.ProcessReceipt = processReceipt says that processReceipt is an unknown variable.
Show me the code again, you probably copied something incorrectly since it isn’t finding processReceipt
Okay I just realised what’s wrong, either change the name of the function from info
to processReceipt
, or replace processReceipt
to info
, it’s because the function’s name is not processReceipt
--Services--
local MarketplaceService = game:GetService("MarketplaceService")
--Integer Defintions--
local AssetID = 1153097919
local function info(receiptInfo)
print("le swo")
if receiptInfo.ProductId == AssetID then
for _,v in pairs(workspace.ConfettiParts:GetDescendants()) do
if v:IsA("ParticleEmitter") then
v.Enabled = true
end
end
wait(15)
for _,v in pairs(workspace.ConfettiParts:GetDescendants()) do
if v:IsA("ParticleEmitter") then
v.Enabled = false
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketplaceService.ProcessReceipt = info
This is what I have, still doesn’t work. Nothing in output either.
Looking to ur game, looks like it’s messy. Are you really sure there’s no other callback?
Run this into console
local function t(x) local a,b = pcall(function() return x.Source; end); return a and b end; for _, x in next, game:GetDescendants() do local s = t(x) if s and s:match('ProcessReceipt') then print(x:GetFullName()) end; end;
Should print all scripts that have “ProcessReceipt” in source.
If there are more than 1, look into it and mix them into one script.
Try printing to check if it is enabled :
print(v.Enabled)
Exactly. Two callbacks, mix them and it should be fine.
How do I mix them? Idk how callbacks work at all lol.
Send the scripts source and I’ll help you out.
What is the source? I feel so dumb rn