I am making a training place for my group and I have a problem. I am trying to make a script that will put random people on a blue team and a red team. I am still learning how to script and am very horrible at it. Thank you for your time and help. Also I would like it so only a HR in a group could say the command.
Sadly, if you are looking for help to do this, you need to be more specific. We cannot just give you a script to look at. You must provide a specific question or work in progress and ask for advice or tips on what needs to be done.
Otherwise, I wish you luck in figuring this out! :D
Thank you. I finally after 2 days of searching found what I needed. :)
Something that I Think might work isdo something put this in starterGUI
1 | local teamval = Instance.new( "IntValue" , script.Paret.Parent) --this puts it in the player |
2 | teamval.Name = teamplacer |
3 | teamval.Value = math.random( 1 , 20 ) --change the weny to the mount of people going to be in it at once |
then, again in the startergui, or starterpack, and have a neutral team at first. And this one has to be a local script.
1 | teamval = script.Parent.Parent.teamplacer |
2 | local player = game.Teams.neutral.LocalPlayer |
3 | if teamval.Value < = 10 then |
4 | player.Parent = game.Teams.Red |
5 | elseif teamval.Value > = 11 then |
6 | player.Parent = game.Teams.Blue |
7 | end |
it was the best thing i could Think of, becuase the program they use is not Always efficient.