|
| 21 Jun 2016 08:39 PM |
I made this script to make a Dev Product give me a set amount of points once someone buys it , I copied this on two other scripts and changed the devproductid and the amount of points but only one of these dev products works.
local MarketplaceService = game:GetService('MarketplaceService') local devproductid = 35441407 -- 75 Points
MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == devproductid then -- give them points player.leaderstats.Points.Value = player.leaderstats.Points.Value + 300 end end end return Enum.ProductPurchaseDecision.PurchaseGranted end
What could be the problem also there is no output. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
brack4712
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 243 |
|
| |
|
|
| 21 Jun 2016 11:12 PM |
| It is terrible, it's pissing me off tbh |
|
|
| Report Abuse |
|
|
brack4712
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 243 |
|
|
| 21 Jun 2016 11:14 PM |
i have an idea, its a workaround, its kinda sketchy, but hey, it will do the job right? so who cares..
After the user is prompted to purchase start a loop for about meh, 60 or so seconds. if they purchase it in that window, have the script give the points and destroy itself. if they dont, have it destroy itself and dont give the points. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2016 11:15 PM |
| I'm a little confused do you mind giving me an example? |
|
|
| Report Abuse |
|
|
brack4712
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 243 |
|
|
| 21 Jun 2016 11:21 PM |
ohhh i see what you are doing. just use playerownsasset
more info here: http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PlayerOwnsAsset |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2016 11:22 PM |
cant use playerownsasset with a developer product
r+://393244197r+://393244224r+://393244262 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
brack4712
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 243 |
|
|
| 21 Jun 2016 11:24 PM |
| @ija, are you sure? i think i have used it before with dev products. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2016 11:29 PM |
| Yeah I don't think that will work either :/ |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 22 Jun 2016 12:52 AM |
Hi Conway,
My advice for you is trying to rewrite the script and look for other errors that you might have put in,
Maybe it won't work because one product has one perticular output and the other needs too have a different one.
Please reply back if this helps,
Speedy12016 |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2016 06:23 PM |
| I tried, that's not the problem |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 12:26 AM |
| sorry I thought it was, sorry that I couldn't help you! :C |
|
|
| Report Abuse |
|
|