I want players to spawn on certain parts of a map if they are on certain teams. script:
01 | if plr.TeamColor = = game.Teams [ "Sentinel" ] .TeamColor then |
02 | target = Vector 3. new( 48.487 , 35.508 , 50.1 ) --Replace those numbers with the desired position! |
03 | for i, v in pairs (game.Players:GetChildren()) do |
04 | v.Character.Torso.CFrame = CFrame.new(target + Vector 3. new( 0 , i * 5 , 0 )) -- Adds an offset of 5 to each player teleported. |
05 | end |
06 |
07 | if plr.TeamColor = = game.Teams [ "Atlas" ] .TeamColor then |
08 | target = Vector 3. new(- 59.08 , 33.905 , - 111.415 ) --Replace those numbers with the desired position! |
09 | for i, v in pairs (game.Players:GetChildren()) do |
10 | v.Character.Torso.CFrame = CFrame.new(target + Vector 3. new( 0 , i * 5 , 0 )) -- Adds an offset of 5 to each player teleported. |
11 | end |
01 | if plr.TeamColor = = game.Teams [ "Sentinel" ] .TeamColor then |
02 | target = Vector 3. new( 48.487 , 35.508 , 50.1 ) --Replace those numbers with the desired position! |
03 | for i, v in pairs (game.Players:GetChildren()) do |
04 | v.Character.Torso.CFrame = CFrame.new(target + Vector 3. new( 0 , i * 5 , 0 )) -- Adds an offset of 5 to each player teleported. |
05 | end |
06 | end |
07 |
08 | if plr.TeamColor = = game.Teams [ "Atlas" ] .TeamColor then |
09 | target = Vector 3. new(- 59.08 , 33.905 , - 111.415 ) --Replace those numbers with the desired position! |
10 | end |
11 | for i, v in pairs (game.Players:GetChildren()) do |
12 | v.Character.Torso.CFrame = CFrame.new(target + Vector 3. new( 0 , i * 5 , 0 )) -- Adds an offset of 5 to each player teleported. |
13 | end |
14 | end |
You forgot to add some ends in your script.