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
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.