How to make a person be in a team when he/she joins?
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.
01 | ct = script.Parent.ClassHolder.CounterTerrorists |
02 | t = script.Parent.ClassHolder.Terrorists |
03 | ClassHolder = script.Parent |
12 | ct.MouseButton 1 Down:connect( function () |
13 | if Teamjoined = = false then |
14 | game.Players.LocalPlayer.TeamColor = BrickColor.new( 'Really blue' ) |
15 | game.Players.LocalPlayer:LoadCharacter() |
16 | ClassHolder.Visible = false |
18 | elseif Teamjoined = = true then |
19 | print 'Error Wait Time' |
23 | t.MouseButton 1 Down:connect( function () |
24 | if Teamjoined = = false then |
25 | game.Players.LocalPlayer.TeamColor = BrickColor.new( 'Really red' ) |
26 | game.Players.LocalPlayer:LoadCharacter() |
27 | ClassHolder.Visible = false |
29 | elseif Teamjoined = = true then |
30 | print 'Error Wait Time' |
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.