To teleport a player, simple set the Position/CFrame of the character's Torso.
First we have to get the player's character. We can do this by doing
1 | local player = game.Players.LocalPlayer |
2 | local character = player.Character |
However, we probably want to wait for the character. We can make sure the Character has loaded by doing this,
1 | local player = game.Players.LocalPlayer |
2 | local character = player.Character or player.CharacterAdded:wait() |
Now we can get the Torso,
1 | local player = game.Players.LocalPlayer |
2 | local character = player.Character or player.CharacterAdded:wait() |
3 | local torso = character:WaitForChild( "Torso" ) |
How to teleport characters,
You can use this at any time during the script. Just CFrame the torso to whatever position you would like. Example,
1 | Torso.CFrame = CFrame.new( 0 , 50 , 0 ) |
Or you can teleport them to a part,
1 | local part = workspace.Part |
2 | Torso.CFrame = part.CFrame |
Side Note,
Your question was confusing and broad. Sorry if I couldn't answer more clearly
Good Luck!
If I helped, please don't forget to accept my answer.