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

Why does this script work for parts and not for models?

while true do
time = .05
a = 10
i = script.Parent
i.Position = Vector3.new(399.3, 1390.5, -1837.25)
wait(time)
i.Position = i.Position + Vector3.new(0,0,a)
wait(time)
i.Position = i.Position + Vector3.new(0,0,a)
wait(time)
i.Position = i.Position + Vector3.new(0,0,a)
wait(1)
end 

1 answer

Hi Akozta, I think the problems you are experiencing are because a Model cannot be assigned a position. You can see this if you click on a model and view the properties. You will notice there is no Position field. If you add a part to your Workspace and repeat the same steps you will see there is a Position field, thus meaning you can tell a part what their position should be but not a Model.

If you need to move multiple parts at the same time try this:

  • Ungroup your model.
  • Select all parts
  • Click "Model" tab and click "Union" This will allow all the parts in your model to act as one Part. If this does not work you can undo the Union by clicking it and click "Separate"

There are other ways of moving multiple parts but my response is already getting kind of lengthy.

Let me know if you need anymore help or have any questions.

Cheers, WindNT :D

2 comments

1

I don't think this is the case...

0

Ya I noticed that, but I thought by making "i" known as the script parent and then designating a vector for "i"'s location then it can have a set location, because I know other people who have models move, but I thought you could still give them a set vector location like a part.

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