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

Does this script work?

wait(60)
Function = Game.Players.Team
Team = ReallyRed
end

Im trying to make a script that changes players team to read every minute and then back to blue every 3 minutes.

2 comments

1

Ahn... You must be new here.

0

Yeah dude.Im really bad at it,but I hope I'll learn lua in at least 2 or 3 years.

2 answers

lol no it wont work @dudemanjude

while true do
wait(60)
for i, v in pairs(game.Players:GetPlayers()) do
v.TeamColor=BrickColor.new("Bright red")
end
wait(180)
for i, v in pairs(game.Players:GetPlayers()) do
v.TeamColor=BrickColor.new("Bright blue")
end
end

2 comments

0

That'd work but ewww indent your code

0

I see no reason to indent code in a script this short

Try this:

game.Players.PlayerAdded:connect(function(player)
	while true do
		wait(60)
		player.TeamColor = BrickColor.new("") -- Put the color of the red team here in the quotes
		wait(180)
		player.TeamColor = BrickColor.new("") -- Put the color of the blue team here in the quotes
	end
end)

That should work and if it doesn't then comment on this answer. I hope that helps!

2 comments

0

Thanks :D

0

Your welcome :D

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