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.