local button = script.Parent local devid = 441671993 button.MouseButton1Click:Connect(function(player) game:GetService("MarketplaceService"):PromptPurchase(player, devid) end)
Your script should have "PromptGamepassPurchase" or "PromptProductPurchase" depending on if it is a gamepass or a dev product. Here is your fixed script: Gamepass script:
local button = script.Parent local devid = 441671993 button.MouseButton1Click:Connect(function(player) game:GetService("MarketplaceService"):PromptGamePassPurchase(player, devid) end)
Dev Product:
local button = script.Parent local devid = 441671993 button.MouseButton1Click:Connect(function(player) game:GetService("MarketplaceService"):PromptProductPurchase(player, devid) end)
Accept this answer if it helped you!