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

Why would this Devproduct script work in Studio, but not in Play?

Asked by 7 years ago

So, this is a devproduct script, located in the ServerScriptService. The accompanying Shop GUI is in the Starter GUI. When I test it in studio, and click the GUI, I recive the money from paying in robux. However, when I purchase more than once, the amount of game dollars I get is more than when I bought for in robux. I'm not exactly sure why. Also, my main problem is that in Play, I get no ingame cash from purchasing with robux. I've seen similar posts about this and maybe it has to do with the script not being local? I'm not sure, maybe it's something in the script itself. If you could help let me know. Here's the script, Thank you!

01game.StarterGui.ResetPlayerGuiOnSpawn = false
02 
03local MarketplaceService = game:GetService("MarketplaceService")
04 
05function getPlayerFromId(id)
06    for i,v in pairs(game.Players:GetChildren()) do
07        if v.userId == id then
08            return v
09        end
10    end
11    return nil
12end
13 
14MarketplaceService.ProcessReceipt = function(receiptInfo)
15    local productId = receiptInfo.ProductId
View all 71 lines...

1 answer

Log in to vote
0
Answered by 7 years ago

I think purchases have to be done locally.

Ad

Answer this question