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

How would I make a random player join a team? [UNANSWERED]

Asked by 9 years ago

I'm making a game where this is pretty much the most important part. So, how would I make a random player join a specific team?

1 answer

Log in to vote
0
Answered by 9 years ago

Something like this;

pl = game.Players:GetPlayers()
rp = pl[math.random(#pl)]
rp.TeamColor = BrickColor.new("Really black")

rp = Random player.

0
Okay, but how do I make them swap to another team? SchonATL 15 — 9y
0
Thanks, that helps ALOT ;3 SchonATL 15 — 9y
0
Changing the TeamColor should automatically change them to the other team. Where it says BrickColor.new("Really black"); put the exact name of the Team's color into the quotations. systematicaddict 295 — 9y
0
Hmm, I just tested it, and it's not working, that's exactly what should work? (other than your previous comment) SchonATL 15 — 9y
Ad

Answer this question