Issue with Character:MoveTo()!

Hi !
I have a problem with Character:MoveTo(), the issue is that when I put a vector3 in that add it to the first position of the character and so it cause bug but in another place it work but the script isn’t exactly the same :
Script1 don’t work :

local function SpawnPlayer(Player)
	Player:LoadCharacter()
	local Character = Player.Character
	Character:MoveTo(Vector3.new(math.random(-1000, 1000), 0.125, math.random(-1000, 1000)))
end

Players.PlayerAdded:Connect(function(Player)
	SpawnPlayer(Player)
end)

Position I get : (412, -99.88500213623047, 753)
Script2 don’t work :

Players.PlayerAdded:Connect(function(Player)
	Player:LoadCharacter()
	local Character = Player.Character
	Character:MoveTo(Vector3.new(math.random(-1000, 1000), 0.125, math.random(-1000, 1000)))
end)

Position I get : (412, 0.125, 753)
Thank you for the reply and have a nice day !

Try Humanoid:MoveTo() instead.

3 Likes

It’s a custom character so I don’t have any Humanoid …
Thanks you very much for the reply !

Interesting thing is that when I change Y to 100 the Y of the part go to 0.125 …
What is happenning ???!!!

you really should add humanoid since you can use Humanoid:MoveTo() also Character:MoveTo() will just teleport the character above the wanted part
heres a post about moving characters (best ways) What is the best way to move a character?