generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
Vypo is not online. Vypo
Joined: 01 Dec 2012
Total Posts: 764
21 Apr 2013 08:45 PM
[ Content Deleted ]
Report Abuse
Voxility is not online. 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 is not online. Vypo
Joined: 01 Dec 2012
Total Posts: 764
21 Apr 2013 08:49 PM
[ Content Deleted ]
Report Abuse
Voxility is not online. Voxility
Joined: 15 Apr 2013
Total Posts: 584
21 Apr 2013 08:51 PM
^ Fixed function.
Report Abuse
Vypo is not online. Vypo
Joined: 01 Dec 2012
Total Posts: 764
21 Apr 2013 08:52 PM
[ Content Deleted ]
Report Abuse
Voxility is not online. 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 is not online. Vypo
Joined: 01 Dec 2012
Total Posts: 764
21 Apr 2013 08:54 PM
[ Content Deleted ]
Report Abuse
Justin55555555555 is not online. Justin55555555555
Joined: 01 Oct 2008
Total Posts: 302
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image