I have been trying to make a dev product and when you click it it should teleport. Im using this for an obby skip stage. Please help iv'e been trying to do this for ages.
Script:
local devpro = 0000000 - Devproduct ID
local part = script.Parent
script.Parent.MouseClick:connect(function(player)
game:GetService("MarketPlaceService")PromptProductPurchase(player, productid)
local Marketplaceservice = game:GetService("MarketplaceService")
Marketplaceservice.ProcessReceipt = function(receiptInfo)
for i, player in pairs (game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == devpro then
local torso = player.Character.Torso
torso.CFrame = CFrame.new(part.position)
end
end
end
return
Enum.ProductPurchaseDecision.PurchaseGranted
end

8 comments
Well, no need to be like, Ur coding sucks get better, Jesus so rude. Thanks I guess, try not to be so un motivating to people next time.
Thanks tho, I do know basic knowledge bro I have been doing this for a year now so you got nothing to say about me. I just had a problem and didnt know what to do because my speciality is not product ids, but thanks i guess
I'm sorry, but if you can't even close off a function, don't know HOW TO USE VARIABLES, cannot correctly spell Connect and have a bunch of broken ends, there's nothing else to say. It wasn't meant to say you are bad at scripting, I said that your current code was bad based on the flaws. I'm not calling you a bad scripter :)
It was constructive >advice<. You should enhance your basics, before moving on to more complicated subjects like this, if you make these mistakes.
I did not mean to insult you.
i know how to do all of that -_- I just was in a hurry, and couldnt correct everything. No need to be rude.
Damn dude learn to take some criticism and advice. You can't prove me wrong that the code you provided was bad.
dude, I was in a hurry. Cant u understand that? All im saying is that I was in a rush and I couldnt correct everything. Thats why the script was poorly produced,