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
 

Re: [Help] Using GetChildren() to find names?

Previous Thread :: Next Thread 
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
10 Sep 2014 06:37 AM
How would I use GetChildren() on teams in order to find the players on the teams and then be able to locate all the players in workspace that are on that specific team?


|Seems legit | devTools
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Sep 2014 08:58 AM
Team = {}

for _,a in pairs(game.Players:GetPlayers()) do
if a.TeamColor.Name == "BrickColor" then
table.insert(Team, a.Name)
end
end
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
10 Sep 2014 03:36 PM
How could I use that to find their character's humanoid in workspace? It would have to select all of a team's humanoids. I'm trying things but nothing I do works. Any help?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
10 Sep 2014 04:00 PM
for i, v in pairs(game.Players:GetChildren()) do
nub = v.Character.Humanoid
nub.WalkSpeed = nub.WalkSpeed + 999999
end

speedhaxxss
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
10 Sep 2014 04:08 PM
Would this work for the players in the teams?

function speed()
for i, v in pairs(game.Teams.Noobs:GetChildren()) do
nub = v.Character.Humanoid
nub.WalkSpeed = 35
end
end
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
10 Sep 2014 04:24 PM
Yes. Test it out
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
10 Sep 2014 04:55 PM
Okay thanks! Also, could it be possible to make it so that if a player on the "guests" team has a specific gamepass then their walkspeed would be 37?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
10 Sep 2014 05:23 PM
I advise checking the wiki. I'm nu experienced in terms of game passes.
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
10 Sep 2014 05:24 PM
Okay thanks. Also, I just finished the speed function and the back function, but they are not working. Here is my script:

function Speed()
for i, v in pairs(game.Teams.Guests:GetChildren()) do
guest = v.Character.Humanoid
guest.WalkSpeed = 35
end
for i, v in pairs(game.Teams.Noobs:GetChildren()) do
nub = v.Character.Humanoid
nub.WalkSpeed = 40
end
end

function back()
for i, v in pairs(game.Teams.Noobs:GetChildren()) do
nub = v.Character.Humanoid
nub.WalkSpeed = 16
end
for i, v in pairs(game.Teams.Guests:GetChildren()) do
guest = v.Character.Humanoid
guest.WalkSpeed = 16
end
z = game.Teams.Noobs:GetChildren()
y = game.Teams.Guests:GetChildren()
y.Parent = game.Teams.Spectators
z.Parent = game.Teams.Spectators
end

Speed()
wait(60)
back()


|Seems legit | devTools
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