|
| 11 Aug 2013 09:46 AM |
while wait() do for i, c in pairs(Game.Players) do local f = c.Character.Head.face if f ~= nil then f:destroy() end end end
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 11 Aug 2013 09:53 AM |
| Output? I'm new to scripting really, this guy gave me this script and it doesn't work so idk. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 11 Aug 2013 09:54 AM |
THIS IS YOUR SCRIPT -
while wait() do for i, c in pairs(Game.Players) do local f = c.Character.Head.face if f ~= nil then f:destroy() end end end
Errors - A. for i, c in pairs(Game.Players) do It should be for i,c in pairs(game.Players:GetChildren()) do
B. local f = c.Character.Head.face if f ~= nil then
It really doesn't work like that. It should be: local f = c.Character.Head:FindFirstChild("face") if f then
This is the finished product -
while wait() do for i, c in pairs(Game.Players:GetChildren()) do local f = c.Character.Head:FindFirstChild("face") if f then f:destroy() end end end
|
|
|
| Report Abuse |
|
|
|
| 11 Aug 2013 09:57 AM |
| I didn't know you could combine the GetChildren() with the in pairs(). :3 |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Aug 2013 09:57 AM |
| Wil lsomeone help me test it? Follow me? |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2013 09:58 AM |
| Well there's an egg over my head, and I'm shy to remove it, so... c: |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Aug 2013 10:03 AM |
"It really doesn't work like that."
Yes it does.
And use GetPlayers instead |
|
|
| Report Abuse |
|
|