Hi, i made a sort of purchase prompting surfacegui but it doesn't seem to be working for me. any help>
local plr = game.Players.LocalPlayer local gpID = 4692614 script.Parent.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(plr, gpID) end)
It seems like you're using a LocalScript, which does not work in the Workspace (except in the local player's character model).
You should instead handle the click event from a valid place, like the StarterPlayerScripts (later inserted into the PlayerScripts folder inside the player). Try navigating to the part that has the SurfaceGui, f.e.:
local plr = game.Players.LocalPlayer local gpID = 4692614 workspace.Part.SurfaceGui.Button.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(plr, gpID) end)