Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I be able to move a model in game?

Asked by
Memotag 226 Moderation Voter
5 years ago

Hi, could anybody point me in the right direction as to how I can move a model while in the game just like you would in studio.

I want to make it clear that I do NOT want someone to do it for me, I would just like to be pointed in the right direction as I am struggling to find this information on my own.

Thank you

2 answers

Log in to vote
0
Answered by 5 years ago

To move a model in game, you use model:MoveTo(Position) model is the object with the class name, model, and position is a vector3 value, using MoveTo can move a model to a new position.

0
thx Zikelah 20 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

You can move a model either with the MoveTo() function or the :SetPrimaryPartCFrame() function. MoveTo() will set it's position using a Vector3 Value while SetPrimaryPartCFrame() gives a CFrame value. I prefer CFrame because using MoveTo can change it's position due to objects around it.

MyModel:MoveTo(Vector3.new(10,10,10))

MyModel:SetPrimaryPartCFrame(CFrame.new(Vector3.new(10,10,10)))

Answer this question