|
| 19 Mar 2014 06:09 AM |
While I was testing and debugging bugs... blahblahblah. So, this bug took 1-2 days of debugging and still idk how to fix it, as a similar bug, I tried a solution, and an efficient way to do it, instead of game.Players:GetChildren()[i] etc, I just used v, same with the other loop except with a z. It says attempt to index nil value. Anyone knows what's wrong? Part of code: for x,v in pairs(game.Players:GetChildren()) do for y,z in pairs(game.StarterPack:GetChildren()) do -- give everyone the weapons z:Clone().Parent = v.Backpack end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Mar 2014 06:32 AM |
for x,v in pairs(game.Players:GetChildren()) do for y,z in pairs(game.StarterPack:GetChildren()) do -- give everyone the weapons z[y]:Clone().Parent = v[x].Backpack end end
|
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 06:34 AM |
| Ohhh, I'll try that, thanks. |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 06:36 AM |
| Sadly didn't work, output says that there is no '1' in tool. |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 06:38 AM |
| well... as far as i can you didn't put a tool inside the StarterPack |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 06:48 AM |
| I see clearly 3 tools in StarterPack. |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 06:59 AM |
| separate that code and then test it alone. before testing, disable the script first and then manually enable it in test mode. |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 07:28 AM |
meShashsta you actually did that wrong
Did you mistake that the second part of the for loop is what the script is getting
so for y you'd say z and for x you'd say v |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Mar 2014 04:32 PM |
| Bump, BTW, I don't get what you mean? |
|
|
| Report Abuse |
|
|
Stefan631
|
  |
| Joined: 23 Dec 2010 |
| Total Posts: 1350 |
|
|
| 19 Mar 2014 05:07 PM |
for i,v in pairs(game.StarterPack:getChildren()) do for i,b in pairs(game.Players:getPlayers()) do if v:IsA("Tool") or v:IsA("HopperBin") then if not b.Backpack:FindFirstChild(v) then v:Clone().Parent = b.Backpack end end end end |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 05:32 PM |
| Still, attempt to index a nil value sadly. |
|
|
| Report Abuse |
|
|
Stefan631
|
  |
| Joined: 23 Dec 2010 |
| Total Posts: 1350 |
|
|
| 19 Mar 2014 06:14 PM |
run this in the output:
for i,v in pairs(game.StarterPack:getChildren()) do for i = 1, #v do print(v.Name) end end |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:29 PM |
Said: "for i,v in pairs(game.StarterPack:getChildren()) do for i =:2: attempt to get length of local 'v' (a userdata value)" but the items in StarterPack are: "AssaultRifle", "Blade", and "RocketLauncher" |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:36 PM |
| Bump. This seems like an impossible bug lol. |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:42 PM |
| Make us a screen shot of the hierchy of the StarterPack. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 11:55 AM |
| It's pending, BTW it's here:http://web.roblox.com/Starterpack-of-my-game-Juggernaut-item?id=150752930 |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 12:38 PM |
| Its moderated, check it out. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 12:41 PM |
| there has to be a player for this to work.... probably two |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 12:43 PM |
for I,v in pairs(game.Players:GetPlayers()) do for a,tool in pairs(game.StarterPack:GetChildren()) do if v and v.Backpack then tool:clone().Parent = v.Backpack end end end
you all been owned |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 01:39 PM |
14:38:54.692 - Workspace.MainScript:43: attempt to index a nil value
Still doesn't work, island. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 01:43 PM |
| MrPark, sure I'll try with two players. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Mar 2014 02:21 PM |
| I agree.. This might be a roblox bug. |
|
|
| Report Abuse |
|
|