Saturnism
|
  |
| Joined: 08 May 2011 |
| Total Posts: 1982 |
|
|
| 24 Mar 2016 09:29 PM |
On why this doesn't work?
local Tools2 = { Good = game.ReplicatedStorage.Run.GoodCoil, Regen = game.ReplicatedStorage.Run.RegenCoil, Mod = game.ReplicatedStorage.Run.ModCoil, ShowOff = game.ReplicatedStorage.Run.ShowOffCoil, Speed = game.ReplicatedStorage.Run.SpeedCoil, Grav = game.ReplicatedStorage.Run.GravCoil } for i,v in pairs(game.Players:GetChildren()) do local Playerr = v RunV = v.RunV local krun = Tools2[RunV.Value]:Clone() krun.Parent = Playerr.Backpack end
|
|
|
| Report Abuse |
|
|
LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
|
| 24 Mar 2016 09:30 PM |
local Tools2 = { Good = game.ReplicatedStorage.Run.GoodCoil; Regen = game.ReplicatedStorage.Run.RegenCoil; Mod = game.ReplicatedStorage.Run.ModCoil; ShowOff = game.ReplicatedStorage.Run.ShowOffCoil; Speed = game.ReplicatedStorage.Run.SpeedCoil; Grav = game.ReplicatedStorage.Run.GravCoil } |
|
|
| Report Abuse |
|
|
Saturnism
|
  |
| Joined: 08 May 2011 |
| Total Posts: 1982 |
|
|
| 24 Mar 2016 09:31 PM |
^Gave me this Workspace.MainScript:59: attempt to index field '?' (a nil value) [Line 59: local krun = Tools2[RunV.Value]:Clone()]
|
|
|
| Report Abuse |
|
|
hkep
|
  |
| Joined: 19 Jul 2014 |
| Total Posts: 550 |
|
|
| 24 Mar 2016 09:40 PM |
v.RunV.Value is not in the table?
|
|
|
| Report Abuse |
|
|
Saturnism
|
  |
| Joined: 08 May 2011 |
| Total Posts: 1982 |
|
|
| 24 Mar 2016 09:42 PM |
RunV = v.RunV Which I think made it so it counts it as a variable within the player called "RunV" where it holds the names in the table (Good, Regen, Mod, etc)
|
|
|
| Report Abuse |
|
|
Saturnism
|
  |
| Joined: 08 May 2011 |
| Total Posts: 1982 |
|
|
| 24 Mar 2016 09:43 PM |
And then I just got the variable within the stringvalue
|
|
|
| Report Abuse |
|
|
Saturnism
|
  |
| Joined: 08 May 2011 |
| Total Posts: 1982 |
|
| |
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 24 Mar 2016 10:25 PM |
| What are you trying to do exactly? your script is really messy. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 24 Mar 2016 11:45 PM |
I don't understand why you couldn't just do this
local run = game.ReplicatedStorage.Run
for i,v in next, game.Players:GetPlayers() do local val = v.RunV run[val.Value]:Clone().Parent = v.Backpack end |
|
|
| Report Abuse |
|
|