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: attempt to index global 'Character' (a nil value)

Previous Thread :: Next Thread 
StaySpy is not online. StaySpy
Joined: 04 Jan 2009
Total Posts: 2311
04 May 2014 05:33 AM
local plr = game.Players:GetPlayers()
for i = 1, #plr do
local booo = plr[i]Character:FindFirstChild("bal1") --HERE
local booo2 = plr[i]Character:FindFirstChild("bal2")
if booo or booo2 then
table.remove(plr, i)
end
end
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
04 May 2014 05:37 AM
local plr = game.Players:GetPlayers()
for i = 1, #plr do
local booo = plr[i]Character:FindFirstChild("bal1") --HERE
local booo2 = plr[i]Character:FindFirstChild("bal2")
if booo or booo2 then
table.remove(plr, i)
end
end

your forgot .

plr[i].Character
Report Abuse
StaySpy is not online. StaySpy
Joined: 04 Jan 2009
Total Posts: 2311
04 May 2014 05:39 AM
Br, as long as I remember, there is no difference.
Anyways, the output log shows the same.
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
04 May 2014 05:40 AM
local plr = game.Players:GetPlayers()
for i = 1, #plr do
local booo = plr[i].Character:FindFirstChild("bal1") --HERE
local booo2 = plr[i].Character:FindFirstChild("bal2")
if booo or booo2 then
table.remove(plr, i)
end
end
Report Abuse
StaySpy is not online. StaySpy
Joined: 04 Jan 2009
Total Posts: 2311
04 May 2014 05:42 AM
Once again, the output log shows the same.
Report Abuse
StaySpy is not online. StaySpy
Joined: 04 Jan 2009
Total Posts: 2311
04 May 2014 05:45 AM
Owait. Now it shows this:

Workspace.Tourney:84: attempt to index field '?' (a nil value)
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
04 May 2014 05:47 AM
show me line 84
Report Abuse
StaySpy is not online. StaySpy
Joined: 04 Jan 2009
Total Posts: 2311
04 May 2014 05:49 AM
Exactly where I wrote --HERE
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
04 May 2014 05:52 AM
local plr = game.Players:GetPlayers()
for i = 1, #plr do
if plr[i] and plr[i].Character then
local booo = plr[i].Character:FindFirstChild("bal1") --HERE
local booo2 = plr[i].Character:FindFirstChild("bal2")
if booo or booo2 then
table.remove(plr, i)
end
end
end
Report Abuse
StaySpy is not online. StaySpy
Joined: 04 Jan 2009
Total Posts: 2311
04 May 2014 06:05 AM
Thanks! Hope I'll not encounter too many bugs now. I think I can reveal the game to the public :D
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