So basically I want to make a game where each round a player is reassigned his team, but I want there to be 3x as many players on one team (They have the disadvantage). So I'm using math.random, but how would I make it so that It's still random, just the odds are in one teams favor? Here is the script:
while true do wait(5) teamchange = math.random(2) if teamchange == 2 then game.Players.LocalPlayer.TeamColor = BrickColor.new("Really red") end if teamchange == 1 then game.Players.LocalPlayer.TeamColor = BrickColor.new("Dark stone grey") end end
Hope You Can Help, Thanks!
what you can do is
while wait(5) do teamchange = math.random(1,4) if teamchange == 1 then game.Players.LocalPlayer.TeamColor = BrickColor.new("Really red") else game.Players.LocalPlayer.TeamColor = BrickColor.new("Dark stone grey") end end
this way, it has 1 chance out of 4 to be red team, and 3 out of 4 chance to be grey team.