Spawn at a spawnpoint

[lua]function RoundSpawn()
local spawn = ents.FindByClass(“info_player_start”)
for num, pl in pairs(AllPlayers) do
local spawnpoint = table.Random(spawn)
pl:UnSpectate()
pl:Spawn()
pl:SetPos(spwanpoint:GetPos())
pl:Lock()
DataToClient(pl)
end
Timer(SpawnDelay, RoundSpawnCD)
end[/lua]

AllPlayers is a modified player.GetAll()
DataToClient, Timer, SpawnDelay, and RoundSpawnCD all exist.

I’ve messed with the order, and changed a ton of things, but the player still just spawns where he is spectating.
I’ve even KillSilent’d the player, and it still doesn’t work.

Also, there aren’t any lua errors.

local spawnpoint = table.Random(spawn)
pl:SetPos(spwanpoint:GetPos())

Wow…

Hold on…

EDIT:
Yeah, didn’t think that was the problem, I’ve tried it with many different variables and setups.

Still just spawns me in the place I’m spectating.

Sorry for bumping, but I kinda need to know this pretty soon.
Any ideas?