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

How to put people on a team? (CERTAIN PEOPLE)

How do i put myself on team owner?

1 answer

Here's some code I wrote, I'm not sure if it will work:

a = game.Players:GetChildren()

game.Players.PlayerAdded:connect(function()
for i,v in pairs(a) do
	if v.Name == "groovydino" then
		v.TeamColor = BrickColor.new("Really Red") --Change really red to whatever teamcolor the "Owner" team is
	else
		v.TeamColor = BrickColor.new("Medium Stone Grey") --Default player teamcolor
	end
end
end)

If that doesn't work, let me know, but it should. Just drop that script into the Workspace and it should work.

1 comment

0

The definition of a must occur upon the event, rather than just initially.

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