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 10 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 10 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 — 10y
0
Thanks, that helps ALOT ;3 SchonATL 15 — 10y
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 — 10y
0
Hmm, I just tested it, and it's not working, that's exactly what should work? (other than your previous comment) SchonATL 15 — 10y
Ad

Answer this question