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

How do I move all parts in a model?

Asked by
lucas4114 607 Moderation Voter
9 years ago

So, the title says it all... How could I move all parts in a model?.. So I mean.. How do I move a whole model?..

3 answers

Log in to vote
0
Answered by 9 years ago

There's this dandy thing called SetPrimaryPartCFrame

but your model needs a primary part to be able to move.

Here's an example

script.Parent.PrimaryPart = script.Parent.PPart

script.Parent:SetPrimaryPartCFrame(cframe)
0
So, then I simply change the position of that primary part?... lucas4114 607 — 9y
0
? lucas4114 607 — 9y
0
no, you use the method, the parameter is where you put the position. LegitimatlyMe 519 — 9y
0
I dun understand that script.. D: So lets use and example, theres a part in a model named Part3, how would I set the part?..... lucas4114 607 — 9y
View all comments (3 more)
0
the same way I set PPart as the Primary Part. LegitimatlyMe 519 — 9y
0
Do not forget; There is also the 'MoveTo' method. TheeDeathCaster 2368 — 9y
0
:( lucas4114 607 — 9y
Ad
Log in to vote
0
Answered by
Ryzox 220 Moderation Voter
9 years ago

It does not look like this was solved so I suggest doing this:

for i = 1,10 do
for i,v in pairs(model:children()) do
v.CFrame = v.CFrame * CFrame.new(0,0.5,0)
end
wait()
end

This would move the whole model 5 studs upwards. Sorry for my bad use if tabbing and bad use of naming things, I am on my iPad

Log in to vote
-1
Answered by 9 years ago

If you still haven't solved your problem, you could go into build mode and use the tools there. The tool with a + on it was made with that kind of move tool built into it I think. Thank Roblox e.e

Answer this question