|
| 31 Jul 2011 02:06 PM |
In these few lines of code, everything would work right. But it wont let me use reload because its a number. Output says so, but Ive seen it done before. This is in a gun.
local reload = Tool.Reload.Value reload = reload- 1 Tool.Name = "Pistol (" reload ")" |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
5943539
|
  |
| Joined: 05 Jan 2010 |
| Total Posts: 810 |
|
|
| 31 Jul 2011 02:09 PM |
Setting a variable to a property and changing it changes the variable...
local reload=Tool.Reload reload.Value=reload.Value-1 Tool.name="Pistol ("..reload.Value..")" |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2011 02:10 PM |
| It works, but only for one shot. The value also doesnt even go down any. |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2011 02:16 PM |
Wait, 594 fixed it. But why doesnt the whole thing work?
local reload = Tool.Reload reload.Value = reload.Value- 1 Tool.Name = "Pistol ("..reload.Value..")" if reload.Value == 0 then enabled = false reload.Value = 20 Tool.Name = "Pistol (" ..reload.Value.. ")" wait(2) enabled = true end |
|
|
| Report Abuse |
|
|