#Gamepass not prompting

1 messages · Page 1 of 1 (latest)

heavy relic
#

Should work but isnt working.

local MarketPlaceService = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer

local gamepassButton = script.Parent
local GamepassID = 1180478580

gamepassButton.Activated:Connect(function()
MarketPlaceService:PromptGamePassPurchase(player, GamepassID)
end)

#

Its a screenGUI so uh

trim yacht
#

First of all is the function local?

heavy relic
trim yacht
#

Also I remember localscripts don't work inside workspace

trim yacht
#

Except in the character model or sum

#

Put it inside player scripts I suggest

#

Then locate the button with a tag or by finding it manually

heavy relic
trim yacht
#

Ran into same issue

#

But it is not a big deal

heavy relic
#

Its just so much harder to organize

trim yacht
#

You can do one of these 2

#

If you have many different scripts with different functionalities for a bunch of GUIs

heavy relic
#

is this pretty good organizing

trim yacht
#

Then put their functions in modulescript and run them

#

Through 1 localscript or 2

heavy relic
trim yacht
#

If they have very similar functionalities then run 1 script to make all of em work

#

Like for example my script here manages all the upgrade boards

heavy relic
#

Wait what do I need to do to make sure the player actually owns the gamepass before giving them access to the itempad

trim yacht
heavy relic
#

If you buy the gamepass then do I use a serverscript for when the player steps on the itempad

#

then give item

trim yacht
#

Then there is like a command to check if a player owns gamepass

#

I made all my shi into products so idk the exact thing

heavy relic
trim yacht
trim yacht
heavy relic
#

or only view

trim yacht
#

If you use a custom purchase system like we did then maybe they can exploit it smh if you made a mistake

#

But otherwise they can't

#

This is my code that works on my upgrade boards

#

It is a bit redundant but this is an example of what you could to do make all GUIs work

heavy relic