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

Is there a way to make a PromptProductPurchase on a SurfaceGUI without using click detectors?

Asked by
uhTeddy 101
6 years ago

This is my script I made:

Localscript:

local MarketPlace = game:GetService("MarketplaceService")
local Player = game:GetService("Players").LocalPlayer


for i,v in ipairs(script.Parent:GetChildren()) do
    if v.ClassName == "ImageButton" then
        v.MouseButton1Down:Connect(function()
            local DevP = v:WaitForChild("Config"):WaitForChild("DevProduct")
            MarketPlace:PromptProductPurchase(DevP.Value)
        end)
    end
end

But it doesn't prompt the purchase

0
Are you getting any errors? Try and include the player as one of your arguments, it is a local script but things are funny sometimes. TheBenSquare 47 — 6y
0
I am not getting errors uhTeddy 101 — 6y

Answer this question