Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i execute a change team script?

how can i make this script work

function checker() c = game.Players:GetChildren() for num, obj in pairs(c) do if obj.Character.Humanoid.Health == 0 then if obj.Teamcolor == BrickColor.new("Bright blue") then obj.Teamcolor = BrickColor.new("Bright red")

checker() -- this to loop the checking end end end wait() -- this is to loop the checking checker() end checker()

2 answers

the script is

function checker()
c = game.Players:GetChildren()
	for num, obj in pairs(c) do
		if obj.Character.Humanoid.Health == 0 then
	    if obj.Teamcolor == BrickColor.new("Bright blue") then 
			obj.Teamcolor =  BrickColor.new("Bright red")	

checker() -- this to loop the checking	
end
end
end
wait() --  this is to loop the checking
checker()
end
checker()

1 comment

0

that i want to work

make sure the color off the team is the same in the script and the team leaderboard then it will work

1 comment

0

it is

This discussion is preserved as it was. New answers, comments, and votes are closed.