How Do you fix this problem with this shop?

So i am very new to Roblox studio i am not a scripter but instead i am a builder so i just follow tutorials
as you can you see below its footage of me trying to do the gamepasses of the game’s shop
how do i fix this?
robloxapp-20231215-1712576.wmv
aswell as the script:
local ShopFrame = script.Parent.Parent.ShopFrame

script.Parent.MouseButton1Up:Connect(function()
ShopFrame.Visible = not ShopFrame.Visible
end)

Fix what? What is your problem and could you please provide the code that is causing the issues or the code that is handling the prompts?

What is the problem, I am guessing you tried clicking the other gamepass Products but the prompt did not show up?

Any owner already has their own gamepass in their inventory or purchased for free.

yeah i was and it wasnt working @Vvshenok and @kwkxbxkdkdjjd

I cannot help you until you show me the what the Buttons parent is unless you want to enter a script into each Gamepass Button.

local productID = 664805745 -- change the id to whatever the gamepass is.
local MarketplaceService = game:GetService("MarketplaceService")

local button = script.Parent -- Place this LocalScript inside the Button for the gamepass.

button.MouseButton1Click:Connect(function()
    local player = game.Players.LocalPlayer
    if player then
        MarketplaceService:PromptGamePassPurchase(player, productID)
    end
end)

Well it still would be appreciated if you provide us with the hierachy of your UI, the code of the responsible buttons and maybe output incase errors pop up while trying to run the code that is causing problems. Most of us can’t help you, if you do not specify your issue.

This may work i will check the script and tell you the parent soon

This was Incredibly useful, i will use this in future projects of mine, thank you this script helped

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.