My script it not working could I have some help?
There is no console errors.
I am trying so if you buy a dev product it TPs you to a part.
This script is in server script service.
local MarketPlaceService = game:GetService('MarketplaceService')
local id = 1181233760
MarketPlaceService.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == id then
player.Character:MoveTo(workspace["GoldenSpawn"].Position)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
end
end