|
| 13 Sep 2011 09:12 PM |
I have this script. game.Players.Character is not working
function onButtonClicked() end local clicker = game.Players.Character cash = clicker.leaderstats["KOs"]
if cash.Value < 50 then return end
if cash.Value >= 50 then
h = game.Lighting.GodSword:clone()
h.Parent = clicker.Backpack
b = game.Lighting.GodSword:clone()
b.Parent = clicker.StarterGear
cash.Value = cash.Value - 50
end
script.Parent.MouseButton1Click:connect(onButtonClicked)
|
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 13 Sep 2011 09:19 PM |
Not even going to read it, I'll just make a new one, since I'm so experienced with Gui shops :o
cost=500 modelname="gun" --put in lighting player=script.Parent.Parent.Parent.Parent --might need to edit script.Parent.MouseButton1Down:connext(function() if player.leaderstats.Money.Value<=cost then wep=game.Lighting:FindFirstChild(modelname):clone() wep.Parent=player.Backpack player.leaderstats.Money.Value=player.leaderstats.Money.Value-cost end end)
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2011 10:29 PM |
| I think you need another end. Whats output? |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2011 10:49 PM |
| Character is not a valid member of Players, or something like that. |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 13 Sep 2011 11:09 PM |
script.Parent.MouseButton1Down:connect(function(Click) local clicker = game.Players.LocalPlayer local cash = clicker.leaderstats["KOs"] if cash.Value >= 50 then game.Lighting.GodSword:clone().Parent = clicker.Backpack game.Lighting.GodSword:clone().Parent = clicker.StarterGear cash.Value = cash.Value - 50 end end)
? |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2011 11:58 PM |
| take off the end at the top, and throw 2 extra end's at the end. |
|
|
| Report Abuse |
|
|