I've been trying to find an answer to this all day. I'm trying to find if the Player has purchased in either Robux or Tix, using the new developer products feature.
if receiptInfo.CurrencyType == Enum.CurrencyType.Robux then
This line wont work, I have no idea why. Help appreciated im growing very tired of this one line.
EDIT Heres the full code if you see no problem with the line.
local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
MarketplaceService.ProcessReceipt = function(receiptInfo)
hi = Instance.new("Hint")
hi.Parent = game.Workspace
hi.Text = receiptInfo.PlayerId .. " has donated with "..receiptInfo.CurrencyType..""
wait(2)
hi:destroy()
if receiptInfo.CurrencyType == Enum.CurrencyType.Robux then
script.Parent.Parent.Pos1.Transparency = 1
script.Parent.Parent.Tix.Value = script.Parent.Parent.Tix.Value + 1
elseif receiptInfo.CurrencyType == Enum.CurrencyType.Tix then
script.Parent.Parent.Pos2.Transparency = 1
script.Parent.Parent.Robux.Value = script.Parent.Parent.Robux.Value + 1
else script.Parent.Parent.Main.Transparency = 0.5
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end

3 comments
No neither of them work sorry. No one seems to have an answer to this anywhere.
Then it must be something else in the script.
I've posted the script now then. It always fires the else statement. If I output what Enum.CurrencyType actually is then it will return "1"