Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

DevProduct not working, Again? was working not working again.

Asked by 6 years ago
Edited 6 years ago

Here is a link to my original Question: https://scriptinghelpers.org/questions/58045/trying-to-set-up-a-devproduct-cant-work-out-why-it-wont-work-any-pointers

This is the updated script:

This is the Button Menu Script

local button = script.Parent
local mpService = game:GetService('MarketplaceService')

button.MouseButton1Down:connect(function()
 mpService:PromptProductPurchase(game.Players.LocalPlayer, 260372991)
end)

This is the DevProduct Script that used to increase the value (worked for a bit, now stopped)

local mpService = game:GetService('MarketplaceService')
function mpService.ProcessReceipt(receiptInfo)
    local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
    if receiptInfo.ProductId == 260372991  then
    player.leaderstats.Scrap.Value = player.leaderstats.Scrap.Value + 40
    return Enum.ProductPurchaseDecision.PurchaseGranted
 end
end

Not sure why it wont work, ive tried using the original script before I changed the Values and Leaderstats Value. And gone on the Original Game, no longer works there either.

0
Hmmm... Place a "print('Test')" just after "function mpService.ProcessReceipt(receiptInfo)" without the ", of course. Does it print? Anyways, are they local scripts or normal scripts? Aimarekin 345 — 6y
0
The Button is Local, and the actual Leaderstats Part is a Regular script. Moo_Blinder 18 — 6y
0
is it inside a part? Where is it located? Aimarekin 345 — 6y
0
It's in a GUI, it used to work fine but just that last week or so it stopped working. Moo_Blinder 18 — 6y
View all comments (3 more)
0
I recommend you to place the server script into ServerScriptService. If it works, tell me so I post it as an answer. Aimarekin 345 — 6y
0
I managed to sort out a new script with some Friends, Cheers anyway Moo_Blinder 18 — 6y
0
oh ok. Aimarekin 345 — 6y

Answer this question