So I am making a game where if you buy a pass you get teleported to a block. I'm not having trouble teleporting the person but, I am having trouble so when the person buys the pass from Market Place Service they teleport. This is my script:
local MarketplaceService = Game:GetService("MarketplaceService")
local buyButton = script.Parent.Button
local productId = 25325022
local player = game.Players.LocalPlayer
buyButton.MouseButton1Click:connect(function()
MarketplaceService:PromptProductPurchase(player, productId)
end)
while wait() do
player.Character.Torso.CFrame = game.Workspace.Comeback.CFrame
end
