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: Table won't insert?

Previous Thread :: Next Thread 
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
21 May 2014 01:18 AM
I'm trying to make a list of eliminated players at the end of a round, but it doesn't work. Instead, it Shows the message form Status2, then skips straight to intermission, without kicking anyone if they're boolvalue isn't true Here's the script where it inserts their name;


function Elimination()
for _, v in pairs (Game.Players:GetPlayers()) do
coroutine.wrap(function()
Status2.Value = "Elimination time. If you didn't make it to the end, you'll be kicked"
wait(5)
if v.Adrenaline.Value ~= true and v.TeamColor == BrickColor.new("Toothpaste") then
table.insert(Eliminated, v.Name)
v:Kick()
elseif v.Adrenaline.Value == true and v.TeamColor == BrickColor.new("Toothpaste") then
v:LoadCharacter()
v.Adrenaline.Value = false
end
end)()
end
Int_Time()
end

Here's the script where it shows it
for _, v in pairs (Eliminated) do
EStatus.Value = "Players Eliminated this round: "..v -- EStatus was already defined as a variable, and there's a gui that uses it's value
wait(1)
end
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
21 May 2014 02:00 AM
EStatus.Value = "Players Eliminated this round: "..v.Name<--needed Name, maybe.

Is there an error showing in the output? if there is could you post it?
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
21 May 2014 02:03 AM
I'm trying to make a list of eliminated players at the end of a round, but it doesn't work. Instead, it Shows the message form Status2, then skips straight to intermission, without kicking anyone if they're boolvalue isn't true Here's the script where it inserts their name;


function Elimination()
for _, v in pairs (Game.Players:GetPlayers()) do
coroutine.wrap(function()
Status2.Value = "Elimination time. If you didn't make it to the end, you'll be kicked"
wait(5)
if v.Adrenaline.Value ~= true and v.TeamColor == BrickColor.new("Toothpaste") then
table.insert(Eliminated, v.Name)
v:Kick()
elseif v.Adrenaline.Value == true and v.TeamColor == BrickColor.new("Toothpaste") then
v:LoadCharacter()
v.Adrenaline.Value = false
end
end)()
end
Int_Time()
end

Here's the script where it shows it
for _, v in pairs (Eliminated) do
EStatus.Value = "Players Eliminated this round: "..v..""
wait(1)
end

I would guess this
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
21 May 2014 02:07 AM
So there is still a problem?
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
21 May 2014 02:50 AM
Yes.
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
21 May 2014 03:04 AM
Is the Adrenaline meant to be in the Player? or PlayerGui? or Character?
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
21 May 2014 07:50 AM
It's in the player. It's a bool value that is supposed to get someone kicked and insert their name into the table if it's false, but it won't work when I add the table.insert
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
22 May 2014 05:27 AM
Ahh now I see the problem.. You need to call the function for it to run :P
so just add Elimination()
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
22 May 2014 06:21 PM
Nonono... This is a part of my game script. It's already called before this part.
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
23 May 2014 01:46 AM
So there's no error in the output, am I right?

If there's not then your only choice is to change the script.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
23 May 2014 01:53 AM
I fixed this fyi =3 thanks though
Report Abuse
roxmat is not online. roxmat
Joined: 10 Jun 2011
Total Posts: 66
23 May 2014 02:12 AM
That's good to hear :)
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