Hi, i have a problem with my gamepass, the message for prompt the GamePass not show.. I want this: https://goo.gl/images/tSKSZ9
My code (it's a LocalScript in StarterCharacterScripts)
local part = workspace.Boat.GamePass1
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local gamePassID = 5111203
part.Touched:Connect(function(hit)
local function promptPurchase()
local player = Players.LocalPlayer
local hasPass = false
local success, message = pcall(function()
hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)
end)
if not success then
warn("Error while checking if player has pass: " .. tostring(message))
return
end
if hasPass == true then
-- Player already owns the game pass; tell them somehow
else
-- Player does NOT own the game pass; prompt them to purchase
MarketplaceService:PromptGamePassPurchase(player, gamePassID)
end
end
end)
what is the problem ?
