So basically I want to make this dev product so when you click on the GUI, you pay and then you teleport to the position I've set. What's wrong with it?
local MarketplaceService = Game:GetService("MarketplaceService")
local buyButton = game.StarterGui.TextButton
local productId = 22416362
buyButton.MouseButton1Click:connect(function()
MarketplaceService:PromptProductPurchase(player, productId)
end)
function Click()
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(-161.5, 465.8, 35.5) -- Position numbers go here.
end
script.Parent.MouseButton1Down:connect(Click)

2 comments
thanks! got it to work :)
good for you! I was stuck forever on that and then I found out there is a difference between PromptProductPurchase and PromptPurchase, lol :P