|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 10 Jun 2011 |
| Total Posts: 66 |
|
|
| 21 May 2014 02:07 AM |
| So there is still a problem? |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 23 May 2014 01:53 AM |
| I fixed this fyi =3 thanks though |
|
|
| Report Abuse |
|
|
roxmat
|
  |
| Joined: 10 Jun 2011 |
| Total Posts: 66 |
|
| |
|