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