Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Does this script work?

Asked by 10 years ago
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.

1
Ahn... You must be new here. Tesouro 407 — 10y
0
Yeah dude.Im really bad at it,but I hope I'll learn lua in at least 2 or 3 years. DerpTrollark 20 — 10y

2 answers

Log in to vote
0
Answered by
wazap 100
10 years ago

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
0
That'd work but ewww indent your code Ekkoh 635 — 10y
0
I see no reason to indent code in a script this short wazap 100 — 10y
Ad
Log in to vote
-1
Answered by 10 years ago

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!

0
Thanks :D DerpTrollark 20 — 10y
0
Your welcome :D dudemanjude 10 — 10y

Answer this question