|
| 15 Nov 2014 02:59 PM |
The players clicks on the gui button and his backpacklimit changes, that's all I need. Output doesn't say anything, it doesn't even print anything so there's something wrong with the function but I can't figure it out????
plr = script.Parent repeat plr = plr.Parent until plr:IsA('Player') sold = false
cost = 300 -- Cost
script.Parent.MouseButton1Down:connect(function() if plr.BackpackLimit.Value == 10 then -- Backpack before this one if plr.leaderstats.Coins.Value >= cost then if sold == false then sold = true plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value - cost plr.BackpackLimit.Value = 20 script.Parent.Parent.Number1.Text = "Sold" script.Parent.Parent.Number1.TextColor3 = Color3.new(77,156,25) else print("nope sold") end else --not enough print("nope coins") end else print("nope backpack") end end)
|
|
|
| Report Abuse |
|
|
| |
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 16 Nov 2014 02:41 AM |
Try using a localscript instead
The potato speaks the truth |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 16 Nov 2014 03:32 AM |
| Local Script doesn't work. |
|
|
| Report Abuse |
|
|
| |
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
|
| 16 Nov 2014 04:37 AM |
| Try adding some breakpoints, to see where it jumps out |
|
|
| Report Abuse |
|
|