ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 10:03 PM |
This is my current script, how do i make it add cash to the player/buyer of the dev product? The cash is located at "game.Players.LocalPlayer.leaderstats.Cash.Value"
local productId = 21651010 local player = game.Players.LocalPlayer local gift = game.Players.LocalPlayer.leaderstats.Cash bought = false mk = game:GetService("MarketplaceService")
function onClick() mk:PromptProductPurchase(player, productId) bought = true mk.PromptProductPurchaseFinished:connect(function(p,id,own) if(own)then gift.Value + 1000 print(p.Name.." has successfully bought "..mk:GetProductPurchase(id).Name.."!") else print(p.Name.." has rejected payment.") bought = false end end) end
script.Parent.MouseButton1Click:connect(onClick)
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2014 10:05 PM |
| gift.Value = gift.Value + 1000 |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 10:08 PM |
thx jake u r really cool k
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
| |
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 10:16 PM |
w8 it didn't work
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 10:17 PM |
i think its somewhere here: local gift = game.Players.LocalPlayer.leaderstats.Cash.Value
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 10:24 PM |
erm.. local gift = game.Players.LocalPlayer:FindFirstChild(leaderstats, Cash)
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 10:27 PM |
because it says "leaderstats" is not a valid child of Player or whatever
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 10:31 PM |
Help, guys?
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 10:35 PM |
Come on guys, it shouldn't be that hard...
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 11:04 PM |
help?
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
|
| 15 Nov 2014 11:05 PM |
Come on...
"the universe came from a magic explosion" - athiests |
|
|
| Report Abuse |
|
|
ZeveI
|
  |
| Joined: 29 Sep 2012 |
| Total Posts: 8003 |
|
| |
|