im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 29 Nov 2013 02:44 AM |
cash = game.Players.LocalPlayer.leaderstats.Cash
function buy()
if script.Parent.Parent.Parent.Mower.Value == 1 then if cash.Value >= 100 then local mower = game.Lighting.Mowers["1AllAroundMowers"]:Clone() mower.Name = "All Around Mower" mower.Parent = game.Players.LocalPlayer.Backpack print("Bought a mower!") end end
end
script.Parent.MouseButton1Click:connect(buy)
This doesn't seem to be working. Its a local script, and is not providing any output at all. Im a bit confused. |
|
|
| Report Abuse |
|
|
Cizox
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 42220 |
|
|
| 29 Nov 2013 02:47 AM |
| Note that when testing solo, leaderstats and all those types of values wont load because the player loads before the scripts load. |
|
|
| Report Abuse |
|
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 29 Nov 2013 02:50 AM |
| Yeah, I launch the Server and Client, not Solo |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 02:51 AM |
| Where is this LocalScript placed.....? |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2013 02:57 AM |
cash = game.Players.LocalPlayer.leaderstats.Cash must be cash = game.Players.LocalPlayer.leaderstats.Cash.Value
#LogicMakesSense |
|
|
| Report Abuse |
|
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 29 Nov 2013 03:12 AM |
| The local script is in a gui. All other scripts in the gui are local scripts and they work perfectly |
|
|
| Report Abuse |
|
|
6e8
|
  |
| Joined: 21 Jul 2013 |
| Total Posts: 10 |
|
|
| 29 Nov 2013 03:22 AM |
| @Why, that won't work. That makes it only readable, not able to write to the value. |
|
|
| Report Abuse |
|
|