I have 12 parts in a model how do I rotate the whole model (From ( 0,0,-30) to (0,0,-60)) This does one part at a time. How do I do the whole model at once? I don't need a very good graphics card do I like people are saying? (That was 109 parts. This is 12 it should work with no lag right?)
local Model = script.Parent function Move() for Index,Part in pairs(Model:GetChildren()) do if Part:IsA("BasePart") then for i=1,30 do Part.CFrame = Part.CFrame*CFrame.fromEulerAnglesXYZ(0,0,-.1) wait(.1) end wait() end end end script.Parent.Handle.ClickDetector.MouseClick:connect(Move)
The issue is not in your graphics card, but in the program flow. As you currently have it, with the loop through the parts outside, and the loop from i=1,30 inside, it will loop through each part and rotate them one by one, waiting until the previous rotation is finished because wait(.1) is inside the for i=1,30 do loop.
To fix it, switch the for loops, so that 30 times, it rotates all parts slighly and waits for a bit, rather than for all parts rotate the part 30 times while waiting before going to the next part.
local Model = script.Parent function Move() for i=1,30 do for Index,Part in pairs(Model:GetChildren()) do if Part:IsA("BasePart") then Part.CFrame = Part.CFrame*CFrame.fromEulerAnglesXYZ(0,0,-.1) end end wait(.1) end end script.Parent.Handle.ClickDetector.MouseClick:connect(Move)