I’m making a plane system and would like one of the things to rotate when the plane is turned on. The issue I currently have is my model wouldn’t rotate when I run the following line of code:
for i = 1, 45 do
Left:SetPrimaryPartCFrame(Left.PrimaryPart.CFrame*CFrame.Angles(0,0,math.rad(2)))
Right:SetPrimaryPartCFrame(Right.PrimaryPart.CFrame*CFrame.Angles(0,0,math.rad(2)))
wait()
end
All of the parts in the model have Weld Constraints to the Main holder part. Based on what I read online, many sources say to use Motor6D. If this is the case, then how’d I go about using it?
not relating to solving the problem but if youre doing it that way that means its unnecessary for you to have a primarypart of your model because the main holder part will be your ‘primary part’, try this code
for i = 1,45 do
Left.pivotname.CFrame = Left.pivotname.CFrame*CFrame.Angles(0,0,math.rad(2))
Right.pivotname.CFrame = Right.pivotname.CFrame*CFrame.Angles(0,0,math.rad(2)) -- it should stop 90 dgres
wait()
end
Just tried it and no luck, it’s the same result as before. I had all of my WeldConstraint’s attached to the pivot of the Left and Right models with those pivots being attached to the Holder part.
The Local Script doesn’t seem to be a factor as when I test it the entire model shakes instead of the two wing spots for the certain amount of time that the for loop would last.
That might be your issue. I’m not entirely sure, but from what I can tell from the API, it sounds like if you try to update the CFrame of one welded part, it will do the same for parts welded to it. This could imply that it is trying to rotate the entire model due to it all being connected by welds, rather than just the part that you want. WeldConstraint (roblox.com)