Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How Can I Make This MoveTo Work?

Hello, I am very novice right now, so please try to understand. I am trying to move a part with MoveTo, why will it now work? Here is the code:

wait(3)
game.Workspace.Part:MoveTo( Vector3.new(10,10,10) )

Thanks!

1 answer

✓ Accepted answer

Always check the roblox wiki as it is very helpful, and to answer your question you can use either of the following, MoveTo is used to "teleport" characters/players as it get's their current character property and moves it to the given location.

wait(3)
game.Workspace.Part.Position = Vector3.new(10,10,10)
 -- this sets the position of the part to the location/coordinates in the workspace BUT, will collide with other bricks if attempted to be put inside a brick
game.Workspace.Part.CFrame = CFrame.new(10,10,10)
-- this also sets the posotion of the part to the location/coordinates in the workspace AND, moves the part through other parts

Also, more information: http://wiki.roblox.com/index.php?title=API:CoordinateFrame

1 comment

0

Oh ok then! So that means MoveTo is a type of command?

This discussion is preserved as it was. New answers, comments, and votes are closed.