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

Why Is My Developer Product Not Working? [Solved]

Asked by 4 years ago
Edited 4 years ago

Hello, I'm trying to make an in-game developer product purchase when you press a button but it doesn't work and I don't know why because it doesn't output any errors.

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

local ProductID = 642376877

script.Parent.MouseButton1Click:Connect(function()  
    MarketplaceService:PromptProductPurchase(Player, ProductID)
end)

Help Would Be Really Appreciated

0
I tested this code and it is working .. are you using ServerScript or LocalScript? 174gb 290 — 4y
0
LocalScript MajinBluee 80 — 4y
0
It should work sheepposu 561 — 4y
0
I just solved it. MajinBluee 80 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

this script should work fine? i tested it with a local script and it works fine proof

0
Somehow it doesn't work for me MajinBluee 80 — 4y
0
I just solved it, The problem was the button because it has a shadow and the shadow is blocking the button so I just put the script inside the shadow and it worked. Thanks for trying to help me. MajinBluee 80 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
local Player = game.Players.LocalPlayer 
local ProductID = 642376877 
script.Parent.MouseButton1Down:Connect(function(Prompt) 
game:GetService("MarketplaceService"):PromptProductPurchase(Player, ProductID)
end)

Also, ensure that it is a LocalScript and is inside the purchase button.

0
I just solved it, The problem was the button because it has a shadow and the shadow is blocking the button so I just put the script inside the shadow and it worked. Thanks for trying to help me. MajinBluee 80 — 4y
0
No problem. Sorry I'm a bit late to reply! Sk3pticalR0BL0X 33 — 4y

Answer this question