Help with GUI Gamepass door script?
Right, I am making a Gamepass door on studio that will move your character back 10 studs if you do not have the gamepass there is also a TextButton on the door which is a single resized brick and that s where I have the problem. With the Buy button here is the script:
1 | local GamepassId = script.Parent.Parent.Parent.Parent.Parent.Parent.Configuration.GamePassID.Value |
3 | script.Parent.MouseButton 1 Click:connect( function () |
4 | local player = game.Players.LocalPlayer |
5 | game:GetService( "MarketplaceService" ):PromptPurchase(player, GamepassId) |
GamepassId leads to a configuration folder in the model with a NumberVaue in it containing the gamepass's ID the problem is it won't prompt the purchase
p.s. the buy button is a TextButton inside about 5 textlabels
if you need any more information on the door to answer this question please leave a comment stating what else is needed