Heres my code, After I buy the Dev product it confirms it and then I dont get teleported
Sever script
local MarketplaceService = game:GetService("MarketplaceService")
local devproductid = 34538597
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in pairs(game.Players:GetChildren()) do
if player.userID ==receiptInfo.PlayerId then
if receiptInfo.ProductId == devproductid then
local torso = player.Character.Torso
torso.CFrame = game.Workspace.ControlRoom.TPBlock.CFrame
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
This is my Developer Product Handling script in ServerScriptService
Local Script
local button = script.Parent
local devproductid = 34538597
button.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, devproductid)
end)
This is my Starter gui button local script

1 comment
Any errors in output? Try printing on different lines and see where the script stops and make sure all conditions of if statements are returning true.