I have tried this but i don't think i have done it properly.
Blue = 0 Red = 0
game.Players.PlayerAdded:connect(function(team)
if Blue = 0 then do if Red= 0 then do
Blue = 1
if Blue = 1 then do If Red = 0 then do
and i kept doing that till i had all of it covered but it didn't work so i just deleted the script.
Does anyone have any ideas of how i could fix it?
Just so you know, you haven't specified that you want a player to be in a specific team at a certain value, you haven't even told the script to do anything. Additionally, don't define two variables in the same line, it doesn't work.
Here's a start to your script, I'm not writing the whole thing for you, but here's a bit to start with:
blue = game.Teams.Blue --This defines the blue team. Make sure a blue team exists! red = game.Teams.Red --This defines the red team. Make sure a red team exists! function onJoin(player) --define your function below end game.Players.PlayerAdded:connect(onJoin)