Dev product issue

Hi there, my team and I are working on a script where the players can press a button and kill me, after buying a dev product. The client side of things works fine, but nothing from this script works. Both the ids are the same, and nothing prints to the console. We have tried rescripting the whole thing, and comparing it to other scripts from other games. Anything helps. Thank you.

local MPS = game:GetService("MarketplaceService")

MPS.ProcessReceipt = function(recieptInfo)
	
	if recieptInfo.ProductId == 1578420358 then
		print("ProcessingServerPurchase")
		local player = game.Players:GetPlayerByUserId(recieptInfo.PlayerId)
		print(player.Name.."HasBoughtKillFarm")
		local farm = game.Players:FindFirstChild("Farmboy014")
		
		farm.Character.Humanoid.Health -= 100
		
		return Enum.ProductPurchaseDecision.PurchaseGranted
		
	end
	
end
1 Like

A similar topic has already been posted. Do look through the solution provided and their explanations, before using the code.

If you face any bugs, feel free to reply!

1 Like

Thank you for sharing this post. Unfortunately, this does not help as the post you shared adds in datastores, to save and such. That is not what I’m looking for as the post you shared just adds in datastores for keeping record and pcall, that is not help if the basic recieptInfo.ProductId won’t print anything, but thank you for your effort. Will keep this open for others to answer.

Alright, but can you share where this script is being placed at? If you didn’t, you can place the script in ServerScriptService.

The script is placed in a folder in ServerScriptService.

Sorry, but it seems like the issue is on roblox’s end. You can’t test product purchase in a team test. You have to test it solo, not in team test.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.