There is a lot going on here but for some reason the teleporting doesn't seem to be working. Help?
local spawns = arenaclone:WaitForChild("Spawns"):GetChildren()
print('a')
for _, player in pairs(game.Players:GetPlayers()) do
if player and #spawns > 0 then
print('b')
if not player.Backpack:FindFirstChild("HyperLaser") then
local h = replicatedstorage:WaitForChild("HyperLaser"):Clone()
h.Parent = player.Backpack
end
local matchtag = Instance.new("StringValue")
matchtag.Name = "MatchTag"
if not player.Character:FindFirstChild("MatchTag") then
matchtag.Parent = player.Character
print('c')
local torso = player.Character:WaitForChild("Torso")
local allspawns = math.random(1, #spawns)
local randomspawn = spawns[allspawns]
if randomspawn and torso then
print('d')
table.remove(spawns, allspawns)
torso.CFrame = CFrame.new(randomspawn.Position + Vector3.new(0, 2, 0))
print('e')
end
end
end |