MoveTo (Method)/humanoid: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
example
>Camoy
fixed code
Line 1: Line 1:
<onlyinclude>{{Method||name = MoveTo
<onlyinclude>{{Method
|name = MoveTo
|arguments = [[Vector3]] ''location'', [[Part]] ''part''
|arguments = [[Vector3]] ''location'', [[Part]] ''part''
|returns = [[nil]]
|description = Causes the character of the humanoid to walk to the location.
|description = Causes the character of the humanoid to walk to the location.
|object = Humanoid
|object = Humanoid
}}</onlyinclude>
}}</onlyinclude>


{{clear floats}}


{{Example|This [[LocalScript]] will make the [[LocalPlayer]]'s [[Character]] walk to a Part.<pre>
local part = game.Workspace.Part
game.Players.LocalPlayer.Character.Humanoid:MoveTo(part.Position, part)
</pre>}}


{{Example|This [[Script]] will make the [[LocalPlayer]]'s [[Character]] walk to the origin.<pre>
game.Players.LocalPlayer.Character.Humanoid:MoveTo( Vector3.new( 0, 0, 0 ) )</pre>}}
[[Category:Methods]]
[[Category:Methods]]

Revision as of 13:56, 31 December 2010

MoveTo( Vector3 location, Part part )
Returns nil
Description: Causes the character of the humanoid to walk to the location.
Member of: Humanoid


Example
This LocalScript will make the LocalPlayer's Character walk to a Part.
local part = game.Workspace.Part
game.Players.LocalPlayer.Character.Humanoid:MoveTo(part.Position, part)