In Workspace, there is a Model named "Player" and in it a brick Named "Part2" along with a humanoid named "Humanoid". There is also a part named "Part" located in Workspace as the target. The script should make Player move to Part:
while wait(.1) do Workspace.Player.Humanoid:MoveTo(Workspace.Part.Position, Workspace.Part) end
(This is written in a regular script in Workspace) ...When ran, however, the brick does not move, and no message appears in the Output declaring I have done something wrong. I have checked the official ROBLOX forums / wiki and researched across the web, but haven't found a solution. I inserted a Mob into my place to see if the MoveTo() function itself was working, and the mob moved without flaw. The MoveTo() function will work with just Vector3 Coordinated, Teleporting Player to Part.
So why is this not working for me? All answers appreciated, Thank You very much. ~Xduel
The function ":MoveTo()" only works on models. If you are trying to move a player from 'Players' first you have to get the players character by saying 'player.Character' then using the moveTo function. It should look like this:
while wait() do wait(0.1) game.Players.PlayerName.Character:MoveTo(0,0,0) -- set to coorinates. end
~Sweetpea11fir