everytime its set to tp to the spawn parts, i just die?
heres the script
local maps = game:GetService("ServerStorage").Maps:GetChildren()
local Title = game.StarterGui.MapSelector.Title
local spawns = game.Workspace.Spawns:GetChildren()
local status = game.ReplicatedStorage.Status
ti = 0
while true do
ti = 10
repeat
ti = ti -1
status.Value = "Intermission "..ti
wait(1)
until ti == 0
local randomMap = maps[math.random(1, #maps)]
randomMap:Clone().Parent = workspace
current = randomMap.Name
status.Value = "Chosen game is "..randomMap.Name
wait(5)
status.Value = "Loading game!"
wait(2)
status.Value = "Starting game!"
wait(2)
local plrs = game.Players:GetChildren()
for i = 1, #plrs do
local randomSpawn = spawns[math.random(1, #spawns)]
plrs[i].Character.HumanoidRootPart.CFrame = CFrame.new(randomSpawn.Position)
end
ti = 30
repeat
ti = ti -1
status.Value = ti.." seconds left!"
wait(1)
until ti == 0
for i = 1, #plrs do
plrs[i].Character.HumanoidRootPart.CFrame = workspace.SpawnLocation.CFrame + Vector3.new(0, 10, 0)
end
workspace[current]:Destroy()
end
