Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 24 Jul 2014 06:41 PM |
Like if there is a whole model of StringValues and is there a way to check if ALL was removed?
Here is what i have that makes them get removed: repeat for i,v in pairs (game.Workspace.ArePlaying:GetChildren()) do game.Players.PlayerRemoving:connect(function(player) if player.Name == v.Name then v:Remove() end end) for t,k in pairs (game.Players:GetChildren()) do k.Character.Humanoid.Died:connect(function(died) if k.Name == v.Name then v:Remove() end end) end end until game.Workspace.GameEnded.Value == true |
|
|
| Report Abuse |
|
|
Undoomed
|
  |
| Joined: 19 Oct 2010 |
| Total Posts: 1662 |
|
|
| 24 Jul 2014 06:43 PM |
| Look for one and if it's nil, then.. |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 24 Jul 2014 06:45 PM |
So it will be like:
if v == nil then --stuff end |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 24 Jul 2014 07:05 PM |
So this script with the if v == nil then
repeat for i,v in pairs (game.Workspace.ArePlaying:GetChildren()) do game.Players.PlayerRemoving:connect(function(player) if player.Name == v.Name then v:Remove() end end) for t,k in pairs (game.Players:GetChildren()) do k.Character.Humanoid.Died:connect(function(died) if k.Name == v.Name then v:Remove() end end) end if v == nil then game.Workspace.GameEnded.Value = true end end until game.Workspace.GameEnded.Value == true |
|
|
| Report Abuse |
|
|
Undoomed
|
  |
| Joined: 19 Oct 2010 |
| Total Posts: 1662 |
|
|
| 24 Jul 2014 07:06 PM |
| I'm not going to open up Roblox Studio and test it.. Does it work or not? |
|
|
| Report Abuse |
|
|
Luc599345
|
  |
| Joined: 25 Jul 2008 |
| Total Posts: 1169 |
|
|
| 24 Jul 2014 07:08 PM |
If you're asking if it's possible to see if a model is empty, you can do
if #model:GetChildren() == 0 then [...] end |
|
|
| Report Abuse |
|
|
Undoomed
|
  |
| Joined: 19 Oct 2010 |
| Total Posts: 1662 |
|
|
| 24 Jul 2014 07:09 PM |
| @Luc, he wants to remove players who join the game. He wants to check when there are no more people that meet the requirements to delete, then have an event happen such as print("Hurray everyone is banned!") |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
| |
|
Luc599345
|
  |
| Joined: 25 Jul 2008 |
| Total Posts: 1169 |
|
| |
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 24 Jul 2014 07:13 PM |
@un
No, i am trying to check if they leaved the game or reset it will remove their value which their name is added into a model at the beginning of the script. |
|
|
| Report Abuse |
|
|