Gkinect
|
  |
| Joined: 04 Dec 2010 |
| Total Posts: 15 |
|
|
| 07 Jan 2014 04:16 PM |
The Script I am using is
moneyToGive = 100 debounce = false script.Parent.Touched:connect(function(hit) if debounce == true then return end player = game.Players:GetPlayerFromCharacter(hit.Parent) if player == nil then return end stat = player:findFirstChild("leaderstats") if stat == nil then return end cash = stat:findFirstChild("Cash") if cash == nil then return end debounce = true cash.Value = cash.Value + moneyToGive wait(2) debounce = false end)
Also if this matters the script money leaderboard I am using i got from a free model to go with the shop gui.
Script for the money leaderboard
function Entered(player) wait() -- This leaderboard was made by JamiyJamie if player:findFirstChild("leaderstats") ~= nil then player.leaderstats:remove() end
stats = Instance.new("IntValue") stats.Parent = player stats.Name = "leaderstats"
money = Instance.new("IntValue") money.Parent = stats money.Name = "Money" money.Value = 250 --How much you start out with change it to how much you want end
game.Players.PlayerAdded:connect(Entered)
c = game.Players:GetChildren() for i=1, #c do Entered(c[i]) end Thanks for helping c: |
|
|
| Report Abuse |
|
|
Gkinect
|
  |
| Joined: 04 Dec 2010 |
| Total Posts: 15 |
|
| |
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 07 Jan 2014 05:24 PM |
| What do you think the problem is? |
|
|
| Report Abuse |
|
|
Gkinect
|
  |
| Joined: 04 Dec 2010 |
| Total Posts: 15 |
|
|
| 07 Jan 2014 05:51 PM |
| I really should learn coding |
|
|
| Report Abuse |
|
|
cycoboy83
|
  |
| Joined: 31 May 2011 |
| Total Posts: 831 |
|
|
| 07 Jan 2014 06:05 PM |
You have two conflicting names. The value in the leaderboard is named "Money", while you're searching for "Cash". Change cash = stat:findFirstChild("Cash") to:
cash = stat:findFirstChild("Money") |
|
|
| Report Abuse |
|
|
Gkinect
|
  |
| Joined: 04 Dec 2010 |
| Total Posts: 15 |
|
|
| 07 Jan 2014 06:53 PM |
| Still not working :c but thanks for trying and helping |
|
|
| Report Abuse |
|
|
Gkinect
|
  |
| Joined: 04 Dec 2010 |
| Total Posts: 15 |
|
|
| 07 Jan 2014 07:10 PM |
Also I think the problem is that it should be cash instead of money....... For all of them? ....i suck |
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 07 Jan 2014 07:13 PM |
| take it slow, don't attempt big stuff if you're not certain of your skills yet. |
|
|
| Report Abuse |
|
|
Gkinect
|
  |
| Joined: 04 Dec 2010 |
| Total Posts: 15 |
|
|
| 07 Jan 2014 07:22 PM |
| oh ok then... thanks? Let me put my new game on pause then :c |
|
|
| Report Abuse |
|
|
Gkinect
|
  |
| Joined: 04 Dec 2010 |
| Total Posts: 15 |
|
| |
|
Fir3bl4ze
|
  |
| Joined: 13 Jul 2012 |
| Total Posts: 310 |
|
| |
|
|
| 07 Jan 2014 08:51 PM |
cash = stat:FindFirstChild("Money")
lel.... Try making your own scripts? |
|
|
| Report Abuse |
|
|
Fir3bl4ze
|
  |
| Joined: 13 Jul 2012 |
| Total Posts: 310 |
|
|
| 07 Jan 2014 08:58 PM |
| We already suggested that. He said it didn't work :/ |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2014 09:01 PM |
if player:findFirstChild("leaderstats") ~= nil then player.leaderstats:remove() end
................................... ( ._.) (._. ) ( ._. ) |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2014 09:02 PM |
| I suggest start from scratch and make our own shop. |
|
|
| Report Abuse |
|
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
| |
|
| |
|
| |
|