of     1   

Zelphurx
#144424945Sunday, August 24, 2014 8:03 PM GMT

I am somewhat new to scripting. I made a script that gives me a black head. However, I want to know if there is a way to use a varient of this to give an entire team a black head. This is the original one: workspace.ChildAdded:connect(function(child) if child:IsA("Model") and child.Name == "Zelphurx" then child:WaitForChild("Body Colors") child["Body Colors"].HeadColor = BrickColor.new("Really black") end end) Could this work to give a team a black head? workspace.ChildAdded:connect(function(child) if child:IsA("Model") and child.Team== "Red Team" then child:WaitForChild("Body Colors") child["Body Colors"].HeadColor = BrickColor.new("Really black") end end)
AnonyAnonymous
#144425135Sunday, August 24, 2014 8:06 PM GMT

if game.Players.Player.TeamColor == BrickColor.new("Color here") then --More Code Here end
Exllumina
#144425144Sunday, August 24, 2014 8:06 PM GMT

It seems to be okay.
masterblokz
#144425159Sunday, August 24, 2014 8:06 PM GMT

for i, v in pairs(game.Players:GetChildren()) do if v.Character and v.TeamColor == BrickColor.new("Really red") then v:FindFirstChild("Head").BrickColor = BrickColor.new("Really black") end end)
Zelphurx
#144425416Sunday, August 24, 2014 8:09 PM GMT

Anoy, I tried that and this came up: 16:08:48.139 - Player is not a valid member of Players
AnonyAnonymous
#144425529Sunday, August 24, 2014 8:10 PM GMT

"Player" was just an example, I would suggest using the examples provided by the other users.
Zelphurx
#144425840Sunday, August 24, 2014 8:14 PM GMT

Master, this didn't work for i, v in pairs(game.Players:GetChildren()) do if v.Character and v.TeamColor == BrickColor.new("White") then v:FindFirstChild("Head").BrickColor = BrickColor.new("Really black") end end
Exllumina
#144426007Sunday, August 24, 2014 8:16 PM GMT

I don't know to script but I think there should "TeamColor" somewhere.
Zelphurx
#144426157Sunday, August 24, 2014 8:18 PM GMT

There is. And nothing has worked so far.
Zelphurx
#144426484Sunday, August 24, 2014 8:22 PM GMT

Nothing is really working, can anyone help?
AnonyAnonymous
#144426506Sunday, August 24, 2014 8:22 PM GMT

v.Character:FindFirstChild("Head").BrickColor = BrickColor.new("Really black") Try that.
Zelphurx
#144427409Sunday, August 24, 2014 8:33 PM GMT

What do i put before and after that? It doesnt say anything about finding the team.
Zelphurx
#144427659Sunday, August 24, 2014 8:36 PM GMT

I mean, that cant be the script on it's own.
AnonyAnonymous
#144427719Sunday, August 24, 2014 8:37 PM GMT

Place it on the third line of the original script provided, additionally, you may also want to read this article regarding loops, http://wiki.roblox.com/index.php?title=Generic_for

    of     1