this script is supposed to teleport the players to different spots each time. the first time it teleports them all to the pods and the second time into the arena. however, it turns out it only tps them to the arena and goes over the pods. on top of that, it does not work in the real game, just studio. Any ideas why?
local parts = {}
local parts2 = {}
for _,part in pairs(game.Workspace.podss:GetChildren()) do
table.insert(parts,part)
end
for _,part in pairs(game.Workspace.pods:GetChildren()) do
table.insert(parts,part)
end
for _,plr in pairs(game.Players:GetPlayers()) do
local partchosen = parts[math.random(1,#parts)]
local partchosen2 = parts2[math.random(1, #parts)]
plr.Character.HumanoidRootPart.CFrame = partchosen.CFrame
for i,part in pairs(parts) do
if part == partchosen then
table.remove(parts,i)
end
end
wait(3)
for i, part2 in pairs(parts2) do
if part2 == partchosen2 then
table.remove(parts, i)
end
end
end

4 comments
Is this a localscript?
nope a normal one
go into play mode and open up your dev console in settings, and see if theres any error codes
nothing at all