So basically I have created a script when you click a part, is prompts the purchase of a developer product and then if you purchase it, it should teleport you. But it doesn't work. Can somebody tell me what I've done wrong? Please help me! (my script:
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
you need a server script too.
what do you mean?