I’m trying to make an in-game shop GUI which let’s the user purchase gamepasses. However everytime I click on the “purchase” button to get the purchase prompt for the gamepass, I get this image.
I have all of the gamepasses set to “active”
(Links to gamepasses on Website)
Pass 1: VIP - Roblox
Pass 2: Speed Coil - Roblox
Pass 3: Gravity Coil - Roblox
Pass 4: Fusion Coil - Roblox
.
And here's an example of the code within the button
script.Parent.MouseButton1Down:Connect(function()
local marketPlaceService = game:GetService("MarketplaceService")
marketPlaceService:PromptProductPurchase(game.Players.LocalPlayer, 265701706)
local Click = Instance.new ("Sound")
Click.Parent = script
Click.SoundId = 421058925
Click:Play()
wait(1)
Click:Destroy()
end)
local button = script.Parent
local originalSize = button.Size
local originalPosition = button.Position
local scaleFactor = 1.05
local function onMouseEnter()
local newOffsetX = originalPosition.X.Offset - (originalSize.X.Offset * (scaleFactor - 1) / 2)
local newOffsetY = originalPosition.Y.Offset - (originalSize.Y.Offset * (scaleFactor - 1) / 2)
button.Size = UDim2.new(originalSize.X.Scale * scaleFactor, originalSize.X.Offset * scaleFactor, originalSize.Y.Scale * scaleFactor, originalSize.Y.Offset * scaleFactor)
button.Position = UDim2.new(originalPosition.X.Scale, newOffsetX, originalPosition.Y.Scale, newOffsetY)
end
local function onMouseLeave()
button.Size = UDim2.new(originalSize.X.Scale, 0, originalSize.Y.Scale, 0)
button.Position = UDim2.new(originalPosition.X.Scale, 0, originalPosition.Y.Scale, 0)
end
button.MouseEnter:Connect(onMouseEnter)
button.MouseLeave:Connect(onMouseLeave)
What can I do to make it so the passes get prompted when the player clicks the prompt prompter?