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

How would I use :MoveTo ?

I know CFraming Is more Efficient but I would to know how to use the MoveTo Method I found this on the wiki but I dont really understand how to use it! I would consider using CFraming But I dont know how I would move the postition of a part to a players torso! Please Help! :D (Note: I dont want a request I Just would Like to know how to use it! :D)

2 answers

:MoveTo() moved the part that is operated on to the coordinates or position. For example, using game.Workspace.Part:MoveTo(0,0,0) would move the Part in the workspace to the coordinates (0,0,0).

It is often used to move Players to certain positions by using :MoveTo on their Torsos, although CFraming is more efficient.

4 comments

0

so How Would I get it to move to the toros?

0

Simply use :MoveTo() on a Player's torso, but provide Coordinates inside of the parentheses.

0

But the players torso will move

0

No, moving a player's Torso moves their entire body with it, because they are connected to it.

Would this work @SlickPwner I have a script that clones the "ClickDetector" and the "Script" the part forms but its not at the torso Position....

Torso = script.Parent
script.Parent.ClickDetector.MouseClick:connect(function(char)
local cloned3 = game.ServerStorage.Part:Clone()	
cloned3.Parent = script.Parent.Parent.Torso.Parent
script.Parent.Anchored = true
script.Parent.Part:MoveTo(Torso)
wait(3)
cloned3:Remove()
script.Parent.Anchored = false
	
end)

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