KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 09 Mar 2014 06:03 PM |
local Mon = game.Players.LocalPlayer.leaserstats.Money.Value
function onClick() if Mon >= 900 then Mon = Mon - 900 game.Lighting["PowerShot"]:Clone().Parent = game.Players.LocalPlayer.Backpack game.Lighting["PowerShot"]:Clone().Parent = game.Players.LocalPlayer.StarterGear end end script.Parent.MouseButton1Down:connect(onClick)
--This is inside of a TextButton, if the player has over 900 money, it still doesn't work. --Help? |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 06:05 PM |
local Mon = game.Players.LocalPlayer.leaserstats.Money
function onClick() if Mon.Value >= 900 then Mon.Value = Mon.Value - 900 game.Lighting["PowerShot"]:Clone().Parent = game.Players.LocalPlayer.Backpack game.Lighting["PowerShot"]:Clone().Parent = game.Players.LocalPlayer.StarterGear end end |
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 09 Mar 2014 06:11 PM |
Still doesn't work.
Is it something wrong with how it's set up maybe?
ScreenGui >Frame >>TextLabel >TextButton >Frame >>TextLabel >>TextButton >>>LocalScript |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 06:12 PM |
leaserstats?
Just noticed, might be typo. |
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 09 Mar 2014 06:20 PM |
Thanks, fixed that.
This still doesn't work though:
local Mon = game.Players.LocalPlayer.leaderstats.Money
function onClick() if Mon.Value >= 900 then Mon.Value = Mon.Value - 900 game.Lighting"PowerShot":Clone().Parent = game.Players.LocalPlayer.Backpack game.Lighting"PowerShot":Clone().Parent = game.Players.LocalPlayer.StarterGear end end |
|
|
| Report Abuse |
|
|
|
| 09 Mar 2014 06:24 PM |
local plr = game.Players.LocalPlayer Mon = plr.leaderstats.Money
--Sometimes calling everything in one go causes problems. Anyway you can't do much without output. Test in play solo.
function onClick() if Mon.Value >= 900 then Mon.Value = Mon.Value - 900 game.Lighting["PowerShot"]:Clone().Parent = plr.Backpack game.Lighting["PowerShot"]:Clone().Parent = plr.StarterGear end end script.Parent.MouseButton1Down:connect(onClick) |
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
| |
|