7Mehdi
|
  |
| Joined: 12 Jan 2015 |
| Total Posts: 503 |
|
|
| 25 Oct 2015 07:50 PM |
I have this script that raises the value if you click on btn1 and decreases value if you click on btn2, they both work however instead of subtracting -1 when you click button two, it goes back to 1. So if your value is 50 and you click button 2, it'll go to 1. anyone know why this is happening?
local player = game.Players.LocalPlayer local btn1 = script.Parent.Clothes.Frame3.Work.B local btn2 = script.Parent.Clothes.Frame3.Work.F
btn1.MouseButton1Down:connect(function() if player.hiddenstats.Jersey.Value <99 then player.hiddenstats.Jersey.Value = player.hiddenstats.Jersey.Value +1 btn2.MouseButton1Down:connect(function() if player.hiddenstats.Jersey.Value >1 then player.hiddenstats.Jersey.Value = player.hiddenstats.Jersey.Value -1 end end) end end)
|
|
|
| Report Abuse |
|
|
|
| 25 Oct 2015 07:58 PM |
local player = game.Players.LocalPlayer local btn1 = script.Parent.Clothes.Frame3.Work.B local btn2 = script.Parent.Clothes.Frame3.Work.F
btn1.MouseButton1Down:connect(function() if player.hiddenstats.Jersey.Value <99 then player.hiddenstats.Jersey.Value = player.hiddenstats.Jersey.Value +1 end end) btn2.MouseButton1Down:connect(function() if player.hiddenstats.Jersey.Value >1 then player.hiddenstats.Jersey.Value = player.hiddenstats.Jersey.Value -1 end end) |
|
|
| Report Abuse |
|
|
7Mehdi
|
  |
| Joined: 12 Jan 2015 |
| Total Posts: 503 |
|
| |
|
| |
|