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

i am trying to make a game pass shop but when i test it it does not show the right product?

Asked by 5 years ago
local productId = 5118935    -- Change to the ID of your developer product.
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
    game:GetService("MarketplaceService"):PromptProductPurchase(player,productId)
end)

5118935 is the id when i test it shows a chicken model please help

0
Probably typed wrong id ToastedBurnt 54 — 5y
0
i tested it over and over with the right id tylergoatboy 82 — 5y
0
Are you sure? (Cuz I’ve never heard of a bug relating to wrong ids showing) Also, :connect is deprecated. Use :Connect instead. Lugical 425 — 5y
0
I can tell you didn't make that. LoganboyInCO 150 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Can u accept my answer if this works?

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

local productId = 5118935

script.Parent.MouseButton1Click:Connect(function()
    MarketplaceService:PromptProductPurchase(plr.UserId ,productId)
end)
0
i do not think it has to do with coding because it did not work and adding userid broke it and your plr before userid the p is in caps so i had to fix it there but thanks for trying :) tylergoatboy 82 — 5y
0
This seems right, although if it doesn’t work, get rid of Players and plr when defining at the top, and add plr in the function. Lugical 425 — 5y
Ad

Answer this question