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

How do you properly use :MoveTo()?

I'm trying to place a NewModel in front of another (CurrentModel) based on the CurrentModel's position but it doesn't seem to be enjoying what I coded.

1 answer

✓ Accepted answer

:MoveTo, is a method of Model, that allows you to adjust it’s current Vector3 position. Similar to SetPrimaryPartCFrame, it requires the respective datatype to adjust accordingly.

local Model = workspace.Model

Model:MoveTo(workspace.Location.Position) --// a Vector3 datatype .

4 comments

0

If there was a second model, I refer the model's position if I want to place the second model? NewModel:Move(OldModel.Position + Vector3.new(10,0,0))

0

Yep, remember it’s MoveTo()

0

I would think that would work, but what I'm working on, that's not happening.

1

If you wish, try NewModel:SetPrimaryPartCFrame(OldModel.CFrame + Vector3.new(10,0,0))

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