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

Why isn't this Developer Product Purchase not working[Unanswered]?

Asked by
faruque 30
9 years ago




local Market = game:GetService("MarketPlaceService") local WalkspeedProductID = 120954837 local ReceiptStorage = game:GetService("DataStoreService"):GetDataStore("Receipts", "Market") function PlayerAdded(Player) Player.CharacterAdded:connect(function(Character) local Receipt = ReceiptStorage:GetAsync(tostring(Player.userId)) if Receipt then if Receipt.WalkspeedProductBought then Character.Humanoid.MaxHealth = 200 end end end) end game.Players.PlayerAdded:connect(PlayerAdded) function GetPlayerByID(id) for _, Player in pairs(game.Players:GetPlayers()) do if Player.userId == id then return Player end end end function Market.ProcessReceipt(ReceiptInfo) if ReceiptInfoProductId == tostring(WalkspeedProductID) then local Current = ReceiptStorage:GetAsync(tostring(ReceiptInfo.PlayerId)) if not Current then Current = {} end Current.WalkspeedProductBought = true ReceiptStorage:SetAsync(tostring(ReceiptInfo.PlayerId), Current) local Player = GetPlayerByID(ReceiptInfo.PlayerId) if Player then Player.Character.Humanoid.MaxHealth = 200 end return Enum.ProductPurchaseDescision.PurchaseGranted end end

1 answer

Log in to vote
0
Answered by 9 years ago

You see how where you put in your product id, well in all the developer product scripts I use to sell mine instead of WalkspeedProductID = 120954837 INSTEAD OF putting WalkspeedProductID TRY putting ProductId thats what all mine say instead of WalkspeedProductID AND try making the D in ID a lowercase that alos might work! If that doesnt work im sorry I tried.

Ad

Answer this question