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)
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.