Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Developer Product Problem?[FIXED by Hyb^]

I made this develper product to change your health to 89, but it is not working **Notes: ** The button is a text button in a surface gui, when you click it it PromptsPurchase to you. You buy it, and the script inside the part that has the surface gui doesnt work. Here is the script:

local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
local productId = 20068872
MarketplaceService.ProcessReceipt = function(receiptInfo) 
	for i, player in ipairs(game.Players:GetChildren()) do
		if player.userId == receiptInfo.PlayerId then
			if receiptInfo.ProductId == productId then
				player.Character.Humanoid.Health = -89
			end
		end
	end	
	
	local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId
	ds:IncrementAsync(playerProductKey, 1)	
	return Enum.ProductPurchaseDecision.PurchaseGranted		
end

2 answers

player.Character.Humanoid.Health = -89

Should be

player.Character.Humanoid.Health = 89

I already helped a few people with Developer Products... here

1 comment

0

Dude one problem, I know I tried that before, But the thing is that when you rejoin you get an extra point amount so I fixed it.

This discussion is preserved as it was. New answers, comments, and votes are closed.