I'm testing my game and I realize that my script can only have 1 player in it. If I change the number, the game must contain that number of players. Please help me try and find a solution.
for i = 1, #player do
if m == 1 then
msg.Parent = game.Workspace
msg.Text = "Choosing Map..."
wait(3)
msg.Text = "Map Chosen: Classic"
wait(3)
msg.Text = "Loading."
wait(1)
msg.Text = "Loading.."
wait(1)
msg.Text = "Loading..."
wait(1)
msg.Text = "Loading."
wait(1)
msg.Text = "Loading.."
wait(1)
msg.Text = "Loading..."
wait(2)
msg:remove()
game.Lighting.LinkedSword:clone().Parent = player[i].Backpack
game.Lighting.RocketLauncher:clone().Parent = player[i].Backpack
game.Workspace.Sounds.Intermission:Stop()
game.Workspace.Sounds.Arena:Play()
wait(0)
target = Vector3.new(-486.5, -17.19, 486.5)
for i, v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 5, 0))
end
game.Lighting.ForceField:clone().Parent = player[i].Character
game.Workspace.ScreenGui:clone().Parent = player[i].PlayerGui
game.Workspace.GameSpawnLabel.TextLabel1:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel1:Remove()
game.Workspace.GameSpawnLabel.TextLabel2:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel2:Remove()
game.Workspace.GameSpawnLabel.TextLabel3:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel3:Remove()
game.Workspace.GameSpawnLabel.TextLabel4:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel4:Remove()
game.Workspace.GameSpawnLabel.TextLabel5:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel5:Remove()
game.Workspace.GameSpawnLabel.TextLabel6:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel6:Remove()
game.Workspace.GameSpawnLabel.TextLabel7:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel7:Remove()
game.Workspace.GameSpawnLabel.TextLabel8:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel8:Remove()
game.Workspace.GameSpawnLabel.TextLabel9:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.TextLabel9:Remove()
game.Workspace.GameSpawnLabel.zTextLabel10:clone().Parent = player[i].PlayerGui.ScreenGui
wait(1)
player[i].PlayerGui.ScreenGui.zTextLabel10:Remove()
game.Workspace.GameSpawnLabel.zTextLabel11:clone().Parent = player[i].PlayerGui.ScreenGui
wait(2)
player[i].PlayerGui.ScreenGui:Remove()
player[i].Character.ForceField:Remove()

2 comments
Dude, use for loops when you want do something a certain number of times, it's much easier than just pasting your code over and over again.
use >= (number) . it makes it work if theres more then or equal to that number specified... http://wiki.roblox.com/index.php/Conditional_statement