I am following this however this assumes the datastore uses Player_XXXXXXXX as a key. Since I process purchase with a different script, I do not know how I can get receiptInfo.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried to do this in hopes of printing data, but I get “nil” 3 times. Then I learned “PurchaseId” type is a string. I realized I have placed a number value. I want to be able to remove a purchase history in my games, but I do not know how. What can I do?
hey thanks for the response. I’ve tried using “tonumber()” but sadly I still get “nil”. I think one solution for me is to change the key format of the purchase history datastore, but I have two players who have already made a purchase. If Roblox sends me a letter saying, “delete data” for these two players, I wouldn’t be able to (because I only changed the key format)
He says he placed a number value. This means tonumber() is rendered absolutely useless, as it gives the same output. Shouldn’t he use tostring() instead?
good point. I did try using tostring() but I still get “nil”. I think it’s impossible to create a key for the purchase history data store on a separate script (since it’s using receiptInfo and there’s no way to access the receiptInfo).