So I made a script and it turns out neat then i added a few lines then the player keeps on spawning in a team already.
ct = script.Parent.ClassHolder.CounterTerrorists
t = script.Parent.ClassHolder.Terrorists
ClassHolder = script.Parent
Teamjoined = false
function WaitTime()
Teamjoined = true
wait(600)
Teamjoined = false
end
ct.MouseButton1Down:connect(function()
if Teamjoined == false then
game.Players.LocalPlayer.TeamColor = BrickColor.new('Really blue')
game.Players.LocalPlayer:LoadCharacter()
ClassHolder.Visible = false
WaitTime()
elseif Teamjoined == true then
print'Error Wait Time'
end
end)
t.MouseButton1Down:connect(function()
if Teamjoined == false then
game.Players.LocalPlayer.TeamColor = BrickColor.new('Really red')
game.Players.LocalPlayer:LoadCharacter()
ClassHolder.Visible = false
WaitTime()
elseif Teamjoined == true then
print'Error Wait Time'
end
end)
Here's also my problem. I want a player to join a team THEN he will have to wait for a couple of seconds before he/she can switch teams.

3 comments
Can you give us the output and elaborate your question?
You know if you set AutoAssign to true for both teams, players will automatically be evenly placed between the two teams, right? It sounds like that's what you're trying to do.
Output was nothing like it didn't print the "Error Wait Time" when a player joined a team. So here's my problem, I joined a team by pressing the button called "team 1" Then the player spawns at "Team 2" Spawn