Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make gamepasses buyable in-game ?

Asked by
Bulvyte 388 Moderation Voter
9 years ago

So i don't even know how it works since it was added in 2012 and i actually quitted in 2011 so yeah and im back in 2015

heres actually the script i've got, which i am testing with my friend and myself in game server. it didn't work for him nor for me

The script is in StarterGui > ScreenGui> Frame > ImageButton > LocalScript how do i make it buyable trough in-game ?

local gamepass = 289963623
local player = game.Players.LocalPlayer

function onClick() 
game:GetService("MarketplaceService"):PromptPurchase(player, gamepass) 
end

script.Parent.MouseButton1Click:connect(onClick)

Answer this question