the player does not teleport to the playing area. an unknown error appears
local lobby = game.Workspace.Spawn
local map = game.ReplicatedStorage.Maps:GetChildren()
local status = game.ReplicatedStorage.Status
while true do
for i = 5, 0, -1 do
status.Value = "Intermission:"..i
wait(1)
end
local chosenmap = map[math.random(1, #map)]
local clonemap = chosenmap:Clone()
clonemap.Parent = game.Workspace
status.Value = "Map:"..clonemap.Name
wait(2.5)
local chosenplayer1 = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]
local chosenplayer2 = nil
repeat
wait()
chosenplayer2 = game.Players:GetPlayers(math.random(1, #game.Players:GetPlayers()))
until chosenplayer2 ~= chosenplayer1
chosenplayer1.Character:MoveTo(clonemap.Teleport1.CFrame)
chosenplayer2.Character:MoveTo(clonemap.Teleport2.CFrame)
for i = 10, 0, -1 do
status.Value = "Liquidation:"..i
wait(1)
end
clonemap:Destroy()
chosenplayer1.Character:PivotTo(lobby.Tp1.CFrame)
chosenplayer2.Character:PivotTo(lobby.Tp2.CFrame)
end