Because of the nature of my procedurally generated map, the player spawns under it. The problem is that whatever I try I can't get to teleport the player and he always falls into the void
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
print(char.Humanoid.Torso)
local hum = char:WaitForChild("Humanoid")
hum.Torso.CFrame = CFrame.new(Vector3.new(0,50,0))
end)
end)
I actually can't understand why this code doesn't work, as it's almost identical to everything else I found online. I tried using both the RootPart and the Torso and simply nothing happens.

3 comments
This didn't work either, and I don't know why, after the game loads map generation is over, so I'm not sure if it's lag or Studio acting up. At the end of the day I just made it so that a spawn is created. Thanks for the reply, I will now try to make a teleport GUI to see if it works then comment back.
The GUI works. I don't know what caused that ( probably the endless death loop, my best guess ). Thank you for the code!
No problem! I hate that sometimes you try so hard to make your code work and then lag or some other stupid issue comes up. I'm glad you figured it out!