game.Players.PlayerAdded:Connect(function(pl)
pl.CharacterAdded:Connect(function(char)
local pos = CFrame.new(22, 10, 0)
char:SetPrimaryPartCFrame(pos)
end)
end)
This code does not teleport code, but if you add wait (1), it works. How to do without wait?

2 comments
The reason this doesn't work is because you can't have nested events like that
I'll write up an answer with how you should have done it, eventhough you already answered it yourself