So, I'm trying to force a Prompt Purchase, if someone doesn't have a gamepass, but if they do, they can access a place. I've finished my code, but it just doesn't want to work.
service = game:GetService("MarketplaceService") teleportService = game:GetService("TeleportService") placeID = 11111111 gamepass = 237848679 game.Players.PlayerAdded:connect(function(onPlayer) if service:PlayerOwnsAsset(onPlayer, gamepass) then teleportService:Teleport(placeID, onPlayer) else service:PromptPurchase(onPlayer, gamepass) end end)