i want a part so when i press the button on the front (I already have the GUI done), a gamepass prompt pops up
here's what I have
local GamepassId = 105980615 script.Parent.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, GamepassId) end)
Basically, you just need to put the SurfaceGui
to the StarterGui
and make the SurfaceGui
's adornee property to the part.
Since LocalScript doesn't run if its inside workspace
, so this should fix the problem.