|
| 10 Jan 2016 02:10 PM |
Should I put this:
marketplace.ProcessReceipt = function(receiptInfo) if receiptInfo.ProductId == 30218530 and receiptInfo.PlayerId == localPlayer.UserId then game.ServerStorage.MoneyStorage[localPlayer.Name].Value = game.ServerStorage.MoneyStorage[localPlayer.Name].Value + 100000 return Enum.ProductPurchaseDecision.PurchaseGranted end end
in a normal script in ServerStorage?
#code local = OP if OP = noob then print "get out" |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 10 Jan 2016 02:10 PM |
| You can only access serverstorage and the processreceipt stuff from a server script, not a local script, so that needs to be in a regular script in the workspace. Make sure you remove the last chunk from the localscript. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 02:14 PM |
Ok, I did all you asked but it wasn't working so I added local ProductId = 30218530 is that a fix?
#code local = OP if OP = noob then print "get out" |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 10 Jan 2016 02:19 PM |
| If it makes it work then yes ;) yeah it will need that line |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 02:20 PM |
Still not working :/
Here is what I have
LocalScript in ScreenGUI:
local marketplace = game:GetService("MarketplaceService") local productId = 30218530 local localPlayer = game.Players.LocalPlayer local buyButton = script.Parent:WaitForChild('Button3')
buyButton.MouseButton1Click:connect(function() marketplace:PromptProductPurchase(localPlayer, productId) end)
Script (normal) in Workspace:
marketplace = game:GetService("MarketplaceService")
marketplace.ProcessReceipt = function(receiptInfo) local playerName = game.Players:GetPlayerFromUserId(receiptInfo.PlayerId).Name if receiptInfo.ProductId == 30218530 then game.ServerStorage.MoneyStorage[playerName].Value = game.ServerStorage.MoneyStorage[playerName].Value + 100000 end end
#code local = OP if OP = noob then print "get out" |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 10 Jan 2016 02:28 PM |
Any errors? Is this is studio or in-game? Are you sure that every player gets a value in MoneyStorage? Is that value called the same name as the player? |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 02:32 PM |
No errors that I see In-game Yes, I have used the developer console to manually give people money Yes
#code local = OP if OP = noob then print "get out" |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 10 Jan 2016 02:34 PM |
| Send me a link and I'll come help you out personally. Does the purchase prompt come up? |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 02:37 PM |
A DL link for the place?
#code local = OP if OP = noob then print "get out" |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 10 Jan 2016 02:38 PM |
| A link to come visit the place while uploaded, just a link to the game. I don't need to download it |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 02:40 PM |
http://www.roblox.com/games/326173207/Pirate-Tycoon-v0-4b
#code local = OP if OP = noob then print "get out" |
|
|
| Report Abuse |
|
|