Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

I Made a Script Where If you buy a Dev Product it Teleports you to a part why is it not working?

Asked by 4 years ago

Code:

``local MPS = game:GetService("MarketplaceService")
MPS.ProcessReceipt = function(receiptInfo)
    if receiptInfo.ProductId == 1052512510 then
        local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
        local player_name = player.DisplayName``
        local ws_player = workspace:FindFirstChild(player_name)
        ws_player:SetPrimaryPartCFrame(script.Parent.Parent.Parent.Workspace.RankGiverPads.Model1.TouchPart.CFrame + Vector3.new(0,5,0))
        return Enum.ProductPurchaseDecision.PurchaseGranted
    end
end``
0
Where are you prompting the product purchase? TheWaildug 55 — 4y
0
a GUI SirOmeletGaming 9 — 4y

Answer this question