Fjfod
|
  |
| Joined: 05 Aug 2013 |
| Total Posts: 81 |
|
|
| 05 Mar 2014 02:46 PM |
Hi, this is TexasTech717's alt. So, looks like all you dudes in the gold hat were right. So, I made a script that goes under the Starter GUI button to buy a product and when you are finished, it gives you plus 500 points. However, it stopped working at the plus 100 points part. Could you please help me if I gave you the script in the first place?
local buyButton = script.Parent local productId = 19217668 local mps = game:GetService"MarketplaceService" local player = script.Parent.Parent.Parent.Parent.Parent
function getPlayerById(id) for i,v in pairs(game.Players:GetPlayers()) do if v.userId == id then return v end end end
buyButton.MouseButton1Click:connect(function() mps:PromptProductPurchase(game.Players.LocalPlayer, productId) end)
mps.ProcessReceipt = function(info) local plr = getPlayerById(info.PlayerId) local money = player.leaderstats.Points money.Value = money.Value + 500 end
Thanks! |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2014 02:47 PM |
| I approve that this was posted by my alt. |
|
|
| Report Abuse |
|
|
Amexurous
|
  |
| Joined: 28 Jan 2014 |
| Total Posts: 324 |
|
| |
|
| |
|
| |
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
|
| 05 Mar 2014 03:11 PM |
| There is no Plus 100 points part... |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
| 07 Mar 2014 07:54 PM |
Can you post the output? local buyButton = script.Parent local productId = 19217668 local mps = game:GetService"MarketplaceService" local player = script.Parent.Parent.Parent.Parent.Parent
function getPlayerById(id) for i,v in pairs(game.Players:GetPlayers()) do if v.userId == id then return v end end end
buyButton.MouseButton1Click:connect(function() mps:PromptProductPurchase(game.Players.LocalPlayer, productId) end)
mps.ProcessReceipt = function(info) local plr = getPlayerById(info.PlayerId) if player:FindFirstChild("leaderstats") ~= nil then local money = player.leaderstats.Points money.Value = money.Value + 500 end end
Maybe your leaderstats script is capitalized? |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 07:54 PM |
| It is. Would that make a difference? |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 07:59 PM |
| output isn't saying something wrong... |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Mar 2014 08:54 PM |
| Shouldn't the mps variable be mps=game:GetService("MarketplaceService")? |
|
|
| Report Abuse |
|
|
| |
|