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

How do I move a model?

Asked by 9 years ago

I am trying to move a model, but I have no clue how, what I tried was:

while true do

    game.Workspace.Model.Position =  game.Workspace.Model.Position + Vector3.New(0, -0.1, 0)
    wait(0.1)
end

Does anyone know how to move a model?

2 answers

Log in to vote
2
Answered by 9 years ago

http://wiki.roblox.com/index.php?title=API:Class/Model/MoveTo You must have primarypart set for the model.

game.Workspace.Model:MoveTo(Vector3.new(0,0,0))
0
I want to give it a smooth movement though, which dosen't work if I use that technique Hyperclux 65 — 9y
0
A tween? User#5978 25 — 9y
0
If you want it to move then it will require another question because it's advanced mathmatics. User#5978 25 — 9y
0
Quite intermediate, actually. Also, CFrame:Lerp()! http://wiki.roblox.com/index.php?title=Cframe#Methods Redbullusa 1580 — 9y
0
if you want to move it smoothly then you could use a for loop and make it repeat add/remove 0.1 to x,y,z until its at 0. Maybe nachsor 36 — 6y
Ad
Log in to vote
1
Answered by 9 years ago

You would use a little thing called MoveTo(). MoveTo is a way to move models. You can use it in a really easy way to move the model. Like this:

while true do
    game.Workspace.Model:MoveTo(Vector3.new(0, -0.1, 0))
    wait(0.1)
end

Answer this question