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

How can I make it so there is only 1 person to be on one team, then the others be on another?

Asked by 10 years ago

I need a script so that I can make it so that 1 person is chosen to get a gun, 1 person is chosen to get a item also, and the other people get nothing. Sort of like the script used in Murder Mystery and TMM.

1 answer

Log in to vote
1
Answered by
MixCorp 70
10 years ago
function Choose()
Players = game.Players:children()
Luck = math.random(1,#Players)
Player = Players[Luck]
for i,v in pairs(Players) do
if v ~= Player then
v.TeamColor = BrickColor.new("Team That Everyone Is On.")
else
v.TeamColor = BrickColor.new("Team With One Person.")
end
end
end

--and then, When you want it to choose....
Choose()
0
Then, You make them all Reset, and you can make Team tools, and do what you want from there. MixCorp 70 — 10y
0
Its not working I have team tools but Im not sure how to make them reset. Also the choose() do you insert the time in there because if you do it dosnt work. Opptitronica 0 — 10y
Ad

Answer this question