Need help with a script

Hello, so I was creating a MarketPlace script, but it seems like it’s not working. I am pretty sure Roblox Studio Scripts Service is kinda down, I just need to know if my script is correct.

local plr = game.Players.LocalPlayer
local gamepassId = 
local MPS = game:GetService("MarketPlaceService")

button.MouseButton1Click:Connect(function()
MPS:PromptGamepassPurchase(plr,gamepassId)
1 Like

I have the gamepass ID, I don’t want to show it, and even if I put the end seems like it’s not working.

Also, I was looking a tutorial on YT and my script is same, but it keeps not working.

Try adding end) to the very end of the script, also make sure that the Gamepass ID is actually assigned to a variable…

Yes, I defined button like this:

local button = script.Parent

ehm maybe you spelt this wrong? Wiki says " PromptGamePassPurchase"

1 Like

Are there errors and did you use end at the end of the script?

Try using this and see if it fixes the issue. Also, are you using Dev Product or actual gamepass?