Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Humanoid:MoveTo() how to change location?

Asked by 6 years ago

When i ask the humanoid to move the second time it just bugs trying to get to those 2 locations at the same time. Is there a way to reset the MoveTo function?

0
wait() ? TheGreatSailor 20 — 6y
0
wait()? Kiriyato 15 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

Oh, for god's sake. If you want to move a Humanoid to two different positions, use CFrame and not Torso and use the wait() function, like this:

function Move(position)
    for i,j in pairs(game.Players:GetPlayers()) do
        i.Torso.CFrame = CFrame.new(position)
    end
end

Move(0,12,34)
wait(5)
Move(0,0,4)

Of course, this is just an example and you can expand upon it as you wish. You can replace the numbers passed to the argument "position" to the numbers of the position you want to move the Player to.

0
Not an anwer to my question tho Kiriyato 15 — 6y
0
You're not supposed to do it at the same time. DeceptiveCaster 3761 — 6y
0
Plus, if you try to move the Humanoid and not the Player, the Player is a dud and becomes a Model instead of a Player. DeceptiveCaster 3761 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

Nvm, i noticed something i didn't before. The question probably doesn't make sense afterall so its normal that the answers wont satisfy me. Thanks anyways!!

0
No prob. DeceptiveCaster 3761 — 6y

Answer this question