Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

LezMakeAGame.. Whats wrong with it? [closed]

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

plrs = game.Players:GetPlayers() maps = game.Lighting:GetChildren() numplrs = #plrs function selectMAP() local selectedMap = maps[math.random(1,#maps)] selectedMap.Parent = Workspace selectedMap.Name = "Map" game.Workspace.Timer.Value = 301 print('1')
repeat wait(1) game.Workspace.Timer.Value = game.Workspace.Timer.Value - 1 until game.Workspace.Timer.Value == 1 or numplrs == 1

print'2'

m = Instance.new("Message", Workspace)
if numplrs == 1 then
    m.Text = "The winner was: "..plrs[1]
        wait(5)
        m:Destroy()
        selectedMap:Destroy()
        script.Disabled = true
end
if game.Workspace.Timer.Value == 1 then
    m.Text = "There was no winner, time ran out."
    wait(5)
    m:Destroy()
    selectedMap:Destroy()
    script.Disabled = true      
end
print'3'

end function tp() local spawns = Workspace.Map.Spawns for i = 1, numplrs do plrs[i]:MoveTo(spawns[i].Position) print'5' sword = game.ServerStorage["Sword"]:clone() sword.Parent = plrs[i].Character end end if Workspace.GoReady.Value == true then selectMAP() print'6' tp() print'7' Workspace.GoReady.Value = false end while wait() do for i,v in pairs(game.Players:GetPlayers()) do if v.Character.Humanoid.Health == 0 then table.remove(plrs,i) print'4' end end end -- the script is LezMakeAGame

Marked as Duplicate by Articulating

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?