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

Really really need help. The script won't work with more than two people?

Asked by 9 years ago

no errors, only teleports one player

local hint = Instance.new("Hint")
ss = game:GetService("ServerStorage")
local maps = ss:GetChildren()
local tim = 160
--define
wait(1)
_G.start = function()
    script.Parent.Check.Disabled = true
for _, players in pairs(game.Players:GetPlayers()) do
players:LoadCharacter()
end
for _, maps in pairs(game.Workspace:GetChildren()) do
if maps.Name == "Map" then
    maps:Destroy()
end
end
    randommap = maps[math.random(1, #maps)]
    hint.Parent = Workspace

hint.Text = "Starting in 20 seconds!"
wait(15)
for i = 5,1, -1 do
    hint.Text = i
    wait(1)
end

  local s = randommap:clone()
hint.Text = "Map chosen is "..s.Namee.Value
s.Parent = Workspace
wait(2)
s.Main.Disabled = false
for _, players in pairs(game.Players:GetPlayers()) do
     players.PlayerGui.Alive.Value = true
    sl = players.Character:FindFirstChild("Torso")
if sl ~= nil then
    sl.CFrame = s.b.CFrame + Vector3.new(0, 1, 0)
end
wait(0.5)
script.Parent.Check.Disabled = false
hint.Parent = ss
wait(tim)
hint.Text = "Round over!"
s.Main.Disabled = true
for _, players in pairs(game.Players:GetPlayers()) do
    get_alive_plrs()
wait(0.01)
players:LoadCharacter()
end
end
end

function get_alive_plrs()
    for _, players in pairs(game.Players:GetPlayers()) do
if players.PlayerGui.Alive.Value == true then
hint.Text = "Players who have won get 2 points"
wait(1)
end
if players.PlayerGui.Alive.Value == true then
    players.leaderstats.Points.Value = players.leaderstats.Points.Value + 2
end
    end
    wait(2)
    restart()
end

function restart()
_G.start()
end

_G.start()



Answer this question