I made a button that when u click, prompts a purchase to the player. It works perfectly fine however the server script does not pick up this purchase. I am quite new to marketPlaceService as I just started learning it recently.

Here is my script. Script in SSS

local marketPlaceService = game:GetService("MarketplaceService")

marketPlaceService.ProcessReceipt = function(information)
	local player = game:GetService("Players"):GetPlayerByUserId(information.PlayerId)
	local newCheck = game.Workspace.Checkpoints:FindFirstChild(player.leaderstats.Stage.Value + 1)
	
	print(player.Name.." just purchased "..information.ProductId)
	
	if information.ProductId == 985532535 then
		player.Character:WaitForChild("HumanoidRootPart").CFrame = newCheck.CFrame + Vector3.new(0,4,0)
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end

Any help is appreciated :)

2 comments

0

add a loop?

0

Where would I add the loop though.