generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Bug in my game Juggernaut

Previous Thread :: Next Thread 
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
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
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
19 Mar 2014 06:22 AM
Bump
Report Abuse
meSmashsta is not online. meSmashsta
Joined: 31 Jan 2013
Total Posts: 1002
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
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
19 Mar 2014 06:34 AM
Ohhh, I'll try that, thanks.
Report Abuse
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
19 Mar 2014 06:36 AM
Sadly didn't work, output says that there is no '1' in tool.
Report Abuse
meSmashsta is not online. meSmashsta
Joined: 31 Jan 2013
Total Posts: 1002
19 Mar 2014 06:38 AM
well... as far as i can you didn't put a tool inside the StarterPack
Report Abuse
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
19 Mar 2014 06:48 AM
I see clearly 3 tools in StarterPack.
Report Abuse
meSmashsta is not online. meSmashsta
Joined: 31 Jan 2013
Total Posts: 1002
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
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
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
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
19 Mar 2014 07:29 AM
Unless i'm wrong
Report Abuse
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
19 Mar 2014 04:32 PM
Bump, BTW, I don't get what you mean?
Report Abuse
Stefan631 is not online. 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
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
19 Mar 2014 05:32 PM
Still, attempt to index a nil value sadly.
Report Abuse
Stefan631 is not online. 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
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
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
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
20 Mar 2014 04:36 PM
Bump. This seems like an impossible bug lol.
Report Abuse
meSmashsta is not online. meSmashsta
Joined: 31 Jan 2013
Total Posts: 1002
20 Mar 2014 04:42 PM
Make us a screen shot of the hierchy of the StarterPack.
Report Abuse
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
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
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
23 Mar 2014 12:38 PM
Its moderated, check it out.
Report Abuse
MrParkwizard is not online. MrParkwizard
Joined: 28 Feb 2011
Total Posts: 679
23 Mar 2014 12:41 PM
there has to be a player for this to work.... probably two
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
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
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
23 Mar 2014 01:43 PM
MrPark, sure I'll try with two players.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
23 Mar 2014 01:46 PM
that should work..:\
Report Abuse
fafafefefofo0 is not online. fafafefefofo0
Joined: 08 Dec 2011
Total Posts: 150
23 Mar 2014 02:21 PM
I agree.. This might be a roblox bug.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image