Up to now no one has helped me with this because every time I try it it is dead jittery and buggy, PLEASE help me move a models children (acting as a door.) SMOOTHLY like when you have 2 models the left door and the right door they move the opposite directions here is what I have so far. :)
local Model = script.Parent.D1 local Model2 = script.Parent.D2 function Move() for Index,Part in pairs(Model:GetChildren()) do if Part:IsA("BasePart") then for i=1,20 do Part.CFrame = Part.CFrame*CFrame.new(0,0,0.5) wait() end wait() end for Index,Part in pairs(Model2:GetChildren()) do if Part:IsA("BasePart") then for i=1,20 do Part.CFrame = Part.CFrame*CFrame.new(0,0,-0.5) wait() end end end end end script.Parent.ClickDetector.MouseClick:connect(Move)
You've almost got it! Where you see "wait", just add a number as a parameter. I suggest .1 or .01. The downside to the script below is that it's going to move "Model" first, then when it's finished, it'll move "Model2"
local Model = script.Parent.D1 local Model2 = script.Parent.D2 function Move() for Index,Part in pairs(Model:GetChildren()) do if Part:IsA("BasePart") then for i=1,20 do Part.CFrame = Part.CFrame*CFrame.new(0,0,0.5) end wait(0.1) end for Index,Part in pairs(Model2:GetChildren()) do if Part:IsA("BasePart") then for i=1,20 do Part.CFrame = Part.CFrame*CFrame.new(0,0,-0.5) end wait(0.1) end end end end script.Parent.ClickDetector.MouseClick:connect(Move)