Just wondering, so far the ID's and stuff are messed up like ROBLOX atm is broken, what should I use?
COMMUNITY QUESTION
Should I use PromptPurchase and PlayerOwnsAsset to see if they own a gamepass and buy one?
1 answer
###No. PlayerOwnsAsset no longer works with game passes, due to the new game pass update. Game passes are no longer assets, in fact. They are their own category. You should be using MarketplaceService.UserOwnsGamePassAsync.
-- Script in ServerScriptService
-- example
local MarketplaceService = game:GetService("MarketplaceService")
local id = 0000000000 --id
game:GetService("Players").PlayerAdded:Connect(function(player)
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, id) then
-- argument is the UserId, not the player!
else
MarketplaceService:PromptGamePassPurchase(player, id)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
