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

How do I select random players to join a team after some time?

Asked by 10 years ago

Does anybody know how to select a few players and make them like terrorist or something? I really don't know how.

Maybe like?

while true do
wait(60)
Random.Players.Team = Team.new("Really red")
end

Well I don't know if that will work but if it doesn't please help.

1 answer

Log in to vote
1
Answered by
RM0d 305 Moderation Voter
10 years ago

Okay it won't. But here you go

while true do -- LOOP
 wait(60) - waits 60 secounds
 players = game.Players:GetChildren() -- gets all players
 ChosenPlayer =players[math.random(1,#players)] -- Gets a random PLayer

ChosenPlayer.TeamColor = BrickColor.new("Really red")-- sets player team color to Really red
end

IF I HELP UPVOTE ME, IF YOU NEED HELP COMMENT BELOW

0
Thanks :D! DerpTrollark 20 — 10y
0
Do you mind to upvote me so people can trust me more RM0d 305 — 10y
Ad

Answer this question