I have a model with 109 parts in. I want to move all the parts at once, how do I do this? Here is what I came up with but it moved each part individually. >.< Help! :3
local Model = script.Parent.Model function Move() for Index,Part in pairs(Model:GetChildren()) do if Part:IsA("BasePart") then for i= 1,109 do Part.CFrame = Part.CFrame*CFrame.new(0,-.1,0) wait(0.1) end end end end script.Parent.BookButton.ClickDetector.MouseClick:connect(Move)
Do you mean "How would I do this?" or "How would I do this without causing major lag?" if you're asking the first one, you'd first set the primary part of the model, and then set the primarypartCFrame to the desired location. If you're asking the second of the two, then I don't think anybody has an answer for that. However, you could to split the model in three or more parts, anchor it, teleport those parts individually, use MakeJoints() on the model, and then unanchor it.