MoveTo (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>PurpleKiwi
Added examples
>Aboy5643
Fixed formatting, looked unsightly.
Line 1: Line 1:
{|
{{:MoveTo (Method)/model}}
|{{:MoveTo (Method)/model}}
 
|{{Example|<pre>Workspace.Player:MoveTo(Vector3.new(0,100,0))</pre>}}
 
|-
{{Clear floats}}
|There is also a separate ''MoveTo'' method exclusively for the [[Humanoid]] object.
 
|-
 
|{{:MoveTo (Method)/humanoid}}
{{Example|<pre>Workspace.Player:MoveTo(Vector3.new(0,100,0))</pre>}}
|{{Example|<pre>Workspace.Player.Humanoid:MoveTo(Workspace.Part.Position,Workspace.Part)</pre>}}
 
|}
There is also a separate ''MoveTo'' method exclusively for the [[Humanoid]] object.
 
 
{{Clear floats}}
 
 
{{:MoveTo (Method)/humanoid}}
 
 
{{Clear floats}}
 
 
{{Example|<pre>Workspace.Player.Humanoid:MoveTo(Workspace.Part.Position,Workspace.Part)</pre>}}
 


[[Category:Methods]]
[[Category:Methods]]

Revision as of 01:51, 22 August 2011

MoveTo( Vector3 destination )
Returns nil
Description: Moves the object and all children instantly to the destination.
Member of: Model



Example
Workspace.Player:MoveTo(Vector3.new(0,100,0))


There is also a separate MoveTo method exclusively for the Humanoid object.



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



Example
Workspace.Player.Humanoid:MoveTo(Workspace.Part.Position,Workspace.Part)