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

Whats wrong with my script?

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 p = print function selectMAP() selectedMap = maps[math.random(1,#maps)] selectedMap.Parent = Workspace game.Workspace.Timer.Value = 301 p('1')
repeat wait(1) game.Workspace.Timer.Value = game.Workspace.Timer.Value - 1

until
game.Workspace.Timer.Value == 1 or numplrs == 1

p'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
p'3'

end while wait() do for i,v in pairs(game.Players:GetPlayers()) do if v.Character.Humanoid.Health == 0 then table.remove(plrs,i) p'4' end end end function tp() local spawns = selectedMap.Spawns for i = 1, numplrs do plrs[i]:MoveTo(spawns[i].Position) p'5' sword = game.ServerStorage["Sword"] end end if Workspace.GoReady.Value == true then selectMAP() p'6' tp() p'7' Workspace.GoReady.Value = false end -- You see, It doesn't even print anything ):

1 answer

Log in to vote
-1
Answered by 10 years ago

Sorry about format New here

Ad

Answer this question