for some reason every time i try to sell my gamepass ingame it fails and it works fine on the website can you send some templates that i can try before making this to complicated? hope i can get it working
What do you mean templates? Try sending a picture of your script/gui
id = 11153778
player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptPurchase(player,id)
end)
Do you have a Gamepass Shop GUI?
yes i do i hate needing to type 30 characters…
Is it enabled?feywghebwfbwefebyfebwfywbfbwf
the buttons show up but when i hit buy its says “this item is not for sale” but it works on the website
show me the script for the gui.
what lgvkjgtfckytfkytfkytfkyfluygfluygluyg
give me an example fsdfesdfesf
go ahead then jqwertyujkioujyhgtfrdeswetrdyfug
You should use MarketplaceService:PromptGamePassPurchase()
instead of :PromptPurchase
. Your script would look something like the following:
local id = 11153778
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptGamePassPurchase(player,id)
end)
For more information on the MarketplaceService, click here.
ummm
once published it worked… gerfsefs
To stop that error you can visit “Game Settings” in Roblox Studio. The icon looks like the one below.
From there, you can go to “Security” along the side.
Then, turn on “Allow Third Party Sales” and click “Save”.
However, do this at your own risk, as it will mean that free models and malicious scripts can potentially prompt purchases to other items which are not part of the game.