Hey scriptinghelpers, I'm ready to move onto developer products! I would consider myself to have a decent understanding of game passes so, I thought I should move onto the next step. Before I start though, I thought it would be important to ask for advice. So, I'm referring to the link provided here https://developer.roblox.com/en-us/articles/Developer-Products-In-Game-Purchases. Kinda don't understand, can't find that many models that give a good example. I was wondering if you could provide me some help! I'm just trying to figure it out. I'm only here to learn and I would appreciate any help I can get! This would be considered fresh to me, something I never dabbled in. I know someone will most likely ask this question but, basically my end goal is to add value to the leaderstats when the developer product is purchased.
How many scripts do you use during this because, it doesn't seem to be any where close to the average game pass script? I don't actually understand that well since I've never seen like a real set up, I couldn't find a quality one myself.
Thanks in advance!(I'm not looking for you to write the code either just need some help understanding)
Firstly, your script must be correct and have the best accuracy of running the script everytime someone bought developer product incase of "OMG U SCAMMED MY 30 ROBUX IM GOING TO REPORT THIS GAME" and comments (use pcall for that, it returns if it error or not, this issue happens sometimes if you directly use ProcessReceipt callback)
Gamepasses are used for once time use, permanently (for example, x2 coins permanently), but for developer product, its used for buying more than once, for example donations (dont do it like flee the facility, when you donate 100 robux and you cant donate more and donators are like why), developer product are also used for things like x2 coins for 1 hour, so you can buy more when it run out of time
Heres a very cool explanation:
For items or abilities that a player might purchase just once, such as a special weapon or a permanent power-up, use gamepasses. Else use Developer Product
dont mess up gamepasses with developer product in scripts, like developer product you use :UserOwnsGamePassAsync because sometimes i do that lol (also developer product is not permanent, so this is really going wrong)
for all the function of developer product (and helpful links):
PromptProductPurchase(LocalPlayer, ProductId) dont do LocalPlayer to UserId, really common mistake but its wrong, if it's a normal script then get the player parameter by PlayerAdded