of     1   

tweetytime
#59888770Tuesday, December 20, 2011 10:18 PM GMT

-- I need it to work... It doesnt even start.... local Maps = game.lighting.Maps:GetChildren() local Plyrs = 2 local KL = game.Teams:GetChildren() local pickedMap = nil local h = Instance.new("Hint") wait(5) function Find_Alive() -- I need to make sure there is atleast two people in the game b4 start local alive = 0 local playersLIST = game.Players:GetChildren() for i = 1, #players:GetChildren() do if playersLIST[i].Alive.Value == true then Alive = Alive+1 end end end function Check_Alive() -- This it the checking part if game.Players.NumPlayers < plyrs then h.Parent = game.Workspace h.Text = "Not Enough Players" wait(1) Check_alive() else h.Parent = game.Workspace h.Text = "Enough Players!" wait(1) h.Text = "Starting Game..." wait(3) h:remove() end end wait(25)-- Lobby Time function Divide_Teams() -- Every players starts on the Grey Team. In otherwords the not playing team. I need this randomly divide the players on the grey team and put them on a active team player = game.Players:GetChildren() for i = 1, #Players do if (player[i] ~= nil) then player[i].TeamColor.new = KL end end end function Explain_Game() -- Just explaining the game. msg.Parent = game.Workspace msg.Text = "Get Ready to play." wait(5) msg.Parent = nil end function Choose_map() -- Chooses The map and puts it in the workspace local pM = game.lighting.Maps(math.random(1,#Maps)) pickedMap = pM:clone() pickedMap.parent = game.workspace end function Map_name() -- desplays the map that was picked msg.Parent = game.Workspace msg.Text = "Map" ..pickedMap.Name.. "has been chosen" wait(5) msg.Parent = nil end function teleport_players() -- teleports players on each team to there side of the map. player = game.Players:GetChildren() for i = 1, #player do if (player[i] ~= nil) then if (player[i].TeamColor == BrickColor.new("Bright Red")) then local location = pickedMap.Spawns.red:GetChildren() players[i].Character.Torso.CFrame = CFrame.new(vector3.new(location.Position.x,location.Position.y+3, location.Position.z)) wait(1) else if (player[i].TeamColor == BrickColor.new("Bright Blue")) then local location = pickedMap.Spawns.blue:GetChildren() players[i].Character.Torso.CFrame = CFrame.new(vector3.new(location.Position.x,location.Position.y+3, location.Position.z)) end end end end end function gear_up() -- Gives all the players their guns player = game.Players:GetChildren() for i = 1, #player do if (player[i] ~= nil) then game.Lighting:findFirstChild("pistol"):clone().Parent = player.Backpack end end end function game_start() -- just waiting to the end of the round. wait(120) end function gear_Down() -- Gives all the players their guns player = game.Players:GetChildren() for i = 1, #player do if (player[i] ~= nil) then player.Backpack:findFirstChild("pistol"):remove() end end end function Back_to_lobby() -- Teleports everyone to the lobby player = game.Players:GetChildren() for i = 1, #player do if (player[i] ~= nil) then player.Character.Torso.CFrame = Cframe.new(vector3.new(-38, 16, 66.6)) -- Change to Correct Lobby Cordinance end end function game_end() -- just waiting to the end of the round. msg.Text = "times UP! now take some time and chilax." wait(5) msg.Parent = nil game.Workspace.pickedMap:Remove() end end wait(1) Find_Alive()
FinnicStar
#59891681Tuesday, December 20, 2011 10:59 PM GMT

Line?
Lockrick
#59891720Tuesday, December 20, 2011 11:00 PM GMT

Any output?
tweetytime
#59892179Tuesday, December 20, 2011 11:06 PM GMT

it says everythings working but its not doing anything :P why????
Lockrick
#59892312Tuesday, December 20, 2011 11:08 PM GMT

What happens during the testing? Have you tweaked the script for testing so that it accepts just one player?
tweetytime
#59893167Tuesday, December 20, 2011 11:20 PM GMT

yeah me and a buddy tryed it and no work :P
Lockrick
#59896185Wednesday, December 21, 2011 12:03 AM GMT

Now that I have looked over the script I see that something does actually happen after that wait time. The 'Find_Alive' function runs at the end. What this accomplishes though is absolutely nothing except counting to 2. To fix this you will need to change a few functions and add a loop at the end, which I did for you: local Maps = game.lighting.Maps:GetChildren() local Plyrs = 2 local KL = game.Teams:GetChildren() local pickedMap = nil local h = Instance.new("Hint") wait(5) function Find_Alive() -- I need to make sure there is atleast two people in the game b4 start local alive = 0 local playersLIST = game.Players:GetChildren() for i = 1, #players:GetChildren() do if playersLIST[i].Alive.Value == true then alive = alive+1 end end return alive end function Check_Alive() -- This it the checking part if Find_Alive() < Plyrs then h.Parent = game.Workspace h.Text = "Not Enough Players" wait(1) return false else h.Parent = game.Workspace h.Text = "Enough Players!" wait(1) h.Text = "Starting Game..." wait(3) h.Parent = nil -- Not COMPLETELY removed... more like on standby. return true end end function Lobby_Time() -- I added this :P wait(25) end function Divide_Teams() -- Every players starts on the Grey Team. In otherwords the not playing team. I need this randomly divide the players on the grey team and put them on a active team players = game.Players:GetChildren() for i = 1, #players do if (players[i] ~= nil) then players[i].TeamColor = KL[math.random(1,#KL)].TeamColor -- Fixed it to do what you said but you'll want to change this later to split players evenly(or maybe not) end end end function Explain_Game() -- Just explaining the game. local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = "Get Ready to play." wait(5) msg.Parent = nil end function Choose_map() -- Chooses The map and puts it in the workspace local pM = game.Lighting.Maps(math.random(1,#Maps)) pickedMap = pM:clone() pickedMap.Parent = game.Workspace end function Map_name() -- desplays the map that was picked local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = "Map " ..pickedMap.Name.. " has been chosen" wait(5) msg.Parent = nil end function teleport_players() -- teleports players on each team to there side of the map. players = game.Players:GetChildren() for i = 1, #players do if (players[i] ~= nil) then if (players[i].TeamColor == BrickColor.new("Bright Red")) then local location = pickedMap.Spawns.red:GetChildren() players[i].Character.Torso.CFrame = CFrame.new(location.Position.x,location.Position.y+3, location.Position.z) wait(1) elseif (players[i].TeamColor == BrickColor.new("Bright Blue")) then local location = pickedMap.Spawns.blue:GetChildren() players[i].Character.Torso.CFrame = CFrame.new(location.Position.x,location.Position.y+3, location.Position.z) end end end end function gear_up() -- Gives all the players their guns players = game.Players:GetChildren() for i = 1, #players do if (players[i] ~= nil) then game.Lighting:findFirstChild("pistol"):clone().Parent = player.Backpack end end end function game_start() -- just waiting to the end of the round. wait(120) end function gear_Down() -- Gives all the players their guns -- or takes them away :P players = game.Players:GetChildren() for i = 1, #players do if (players[i] ~= nil) then player.Backpack:findFirstChild("pistol"):remove() end end end function Back_to_lobby() -- Teleports everyone to the lobby players = game.Players:GetChildren() for i = 1, #players do if (players[i] ~= nil) then players[i].Character.Torso.CFrame = CFrame.new(-38, 16, 66.6) -- Change to Correct Lobby Coordinance end end end function game_end() -- just waiting to the end of the round. local msg = Instance.new("Message") msg.Text = "times UP! now take some time and chilax." wait(5) msg.Parent = nil game.Workspace.pickedMap:Remove() end wait(1) while true do Lobby_Time() if (Check_Alive()) then Divide_Teams() Explain_Game() Choose_map() Map_name() teleport_players() gear_up() game_start() gear_Down() Back_to_lobby() game_end() end end

    of     1