|
| 30 May 2013 05:36 PM |
Why won't this work?
while true do wait (0.0000001) c=game.Players:FindFirstChild("Player") if c.Name == "montanaontario2392" then return end if c~= nil then c :remove() else end end
No output |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 30 May 2013 05:37 PM |
if c~= nil then
I have no idea what this means. |
|
|
| Report Abuse |
|
|
|
| 30 May 2013 05:38 PM |
it means if there is no player. nil = nothing. c = player. |
|
|
| Report Abuse |
|
|
|
| 30 May 2013 05:38 PM |
It means like if the item is there. or something. |
|
|
| Report Abuse |
|
|
|
| 30 May 2013 05:38 PM |
| Probably because of all the decimal places in wait(). I don't think ROBLOX allows such a small decimal... Try to stay within the thousandths. |
|
|
| Report Abuse |
|
|
|
| 30 May 2013 05:39 PM |
No it does.
Ive had
wait (0.000000000000000000000000000000000000000000000000001)
and it still worked. |
|
|
| Report Abuse |
|
|
magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 30 May 2013 05:41 PM |
Pro tip-
Using wait() with no numbers will wait the shortest amount of time roblox can wait. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 30 May 2013 05:51 PM |
| Your trying to remove every person apart from yourself? |
|
|
| Report Abuse |
|
|
| |
|
magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 30 May 2013 05:55 PM |
try this.
while true do wait () players = game.Players:GetChildren() for i=1, #players do if players[i].Name == "montanaontario2392" then return end if players[i]~= nil then players[i] :remove() end end end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 30 May 2013 06:58 PM |
c=game.Players:FindFirstChild("Player")
^This will only work if the player named "Player" is in your game. |
|
|
| Report Abuse |
|
|
|
| 30 May 2013 07:00 PM |
| How would I change it to find every player within the game then? |
|
|
| Report Abuse |
|
|
Figure65
|
  |
| Joined: 23 May 2007 |
| Total Posts: 2663 |
|
|
| 30 May 2013 07:06 PM |
game.Players.PlayerAdded:connect(function(Player) if Player.Name ~="montanaontario2392" then print("mon") else do end Player:Remove() end end)
try this
|
|
|
| Report Abuse |
|
|
|
| 30 May 2013 07:09 PM |
Would this work?
workspace.ChildAdded:connect(function(item) if item:IsA("Player") wait(1) if item.Name == "montanaontario2392" then return end if item.Parent == game.Players then item:Destroy() end end end) |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 30 May 2013 07:15 PM |
No, because the 'item.Parent' would always be Workspace...
--- If you want the script to bare entry, then Memory's script is what you're looking for. You're trying to over-complicate things.
|
|
|
| Report Abuse |
|
|
Figure65
|
  |
| Joined: 23 May 2007 |
| Total Posts: 2663 |
|
|
| 30 May 2013 07:16 PM |
i=game.Players:FindFirstChild("Player") while true do if i.Name=="montanaontario2392" then do print("yolo") else do end i:Remove() end end |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 30 May 2013 07:17 PM |
@Figure, What are you even doing... e.e |
|
|
| Report Abuse |
|
|
|
| 30 May 2013 07:18 PM |
game.Players.ChildAdded:connect(function(item) if item:IsA("Player") wait(1) if item.Name == "montanaontario2392" then return end if item.Parent == game.Players then item:Destroy() end end end)
? |
|
|
| Report Abuse |
|
|
Figure65
|
  |
| Joined: 23 May 2007 |
| Total Posts: 2663 |
|
|
| 30 May 2013 07:18 PM |
@desp I don't even know anymore :D |
|
|
| Report Abuse |
|
|
| |
|