I Want my code to tp the player to a location

I want my code to Tp the player to a certain place after 10 seconds
This script is located under starter player scripts

wait(10)
game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(.948, 127.177, -675.052)

After I load in it just glitch’s out and I go miles away from where I want to be

Please help me

LargeHotDogs13

Remember that LocalPlayer won’t work on server scripts.

Use CFrame, or MoveTo, there are also other methods you could use.

Its a Starter Player script thought.

Well even doing it in a StarterPlayer script it’ll only move the Character on the Client, not the Server. Therefore do so on the Server instead of the Client so everyone can see it.

Do you know how to do that?

LargeHotDogs13

Try a server script:

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
       wait(10)
       char.HumanoidRootPart.Position = Vector3.new(.948, 127.177, -675.052)
    end)
end)

since the player owns themselves, anything player-wise will be cloned to the server.

@LargeHotDogs13 This will work just fine

wait(10)
game.Players.LocalPlayer.Character:MoveTo(Vector3.new(.948, 127.177, -675.052))

The player (client) of which a character model belongs to will have network ownership of that character model.

wait(10)
game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(.948, 127.177, -675.052)
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
       wait(10)
       char.HumanoidRootPart.Position = Vector3.new(.948, 127.177, -675.052)
    end)
end)

These scripts do exactly the same thing.
Here’s the correct approach to teleporting a player’s character.

local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
character:PivotTo(CFrame.new(0, 125, -675))