01 | repeat wait() |
02 | until game.Players.NumPlayers > = 2 wait( 10 ) |
03 |
04 | local Officer = game.ReplicatedStorage.Characters.Officer:GetChildren() |
05 |
06 | local Cops = { Officer } |
07 |
08 | local SelcCop = nil |
09 |
10 | function CopSelect() |
11 | for i, v in pairs (Cops) do |
12 | if game.Players.NumPlayers > = 2 and game.Players.NumPlayers < = 12 then |
13 | SelcCop = game.Players:GetChildren() [ math.random( 1 , game.Players.NumPlayers) ] |
14 | for _,l in pairs (SelcCop:GetChildren()) do |
15 | if l:IsA( "CharacterAppearance" ) then |
I'm trying to get it to select the 2 players as cops, but it will never run.
Put some prints in there to check to see where it stops. So like:
01 | repeat wait() |
02 | until game.Players.NumPlayers > = 2 |
03 | wait( 10 ) |
04 | print ( "Cops Selected" ) |
05 | local Officer = game.ReplicatedStorage.Characters.Officer:GetChildren() |
06 | local Cops = { Officer } |
07 | local SelcCop = nil |
08 | function CopSelect() |
09 | print ( "Cops Being Customized" ) |
10 | for i, v in pairs (Cops) do |
11 | if game.Players.NumPlayers > = 2 and game.Players.NumPlayers < = 12 then |
12 | SelcCop = game.Players:GetChildren() [ math.random( 1 , game.Players.NumPlayers) ] |
13 | print ( "OH SNAP TIME TO START" ) |
14 | for _,l in pairs (SelcCop:GetChildren()) do |
15 | if l:IsA( "CharacterAppearance" ) then |