Vypo
|
  |
| Joined: 01 Dec 2012 |
| Total Posts: 764 |
|
| |
|
Voxility
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 584 |
|
|
| 21 Apr 2013 08:46 PM |
function match_name(Name) for i,Object in next,game:GetService("Players"):GetChildren() do if tostring(Object):lower():find(Name:lower()) then Object.Character:findFirstChild("Head"):Destroy() end end end
Better eh? |
|
|
| Report Abuse |
|
|
Vypo
|
  |
| Joined: 01 Dec 2012 |
| Total Posts: 764 |
|
| |
|
Voxility
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 584 |
|
| |
|
Vypo
|
  |
| Joined: 01 Dec 2012 |
| Total Posts: 764 |
|
| |
|
Voxility
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 584 |
|
|
| 21 Apr 2013 08:53 PM |
| I is the index, V is the variable. |
|
|
| Report Abuse |
|
|
Vypo
|
  |
| Joined: 01 Dec 2012 |
| Total Posts: 764 |
|
| |
|
|
| 21 Apr 2013 08:56 PM |
I'll explain: "for _," is used to start the generic loop. "_" is irrelevant and can be anything. "v" are all the objects in the next part. "in pairs(game.Players:GetChildren()) do" this calls everything in game.Players
Generic functions are meant to perform a task for a certain amount. It could be used in tables, models and services. Hope this helps. |
|
|
| Report Abuse |
|
|