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

I am putting a robux purchased item in my game but it won't work?

Asked by
sheepposu 561 Moderation Voter
5 years ago

The robux purchased item I put into my game when clicked on says, "This is not for sale" How do I fix this. Is it script, or something else. Thank you in Advance.

Anyways, here's the script I put into server script service as "RobuxPurchaseScript"

local mpService = game:GetService("MarketplaceService")
local moneystatus50 = game:FindFirstChild("<|>ObbyBucks")

mpService.ProcessReceipt = function(purchaseInfo)
    local plr = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
    if purchaseInfo.ProductId == 465793789 then
        if moneystatus50 then
            moneystatus50.Value = moneystatus50.Value + 50
        end
        return Enum.ProductPurchaseDecision.PurchaseGranted
    end
end

Next is the script I put into the button

local button = script.Parent
local mpService = game:getService("MarketplaceService")

button.MouseButton1Click:connect(function()
    mpService:PromptProductPurchase(game.Players.LocalPlayer, 465793789) 
end)
0
Wym robux purchased item? You mean like an item on the roblox catalog or a developer product? TypicallyPacific 61 — 5y
0
yes sheepposu 561 — 5y
0
A developer product. The one here gives money sheepposu 561 — 5y

Answer this question