Mad Scientist Glum7 here,
So I've apparently lost the ability of knowing how to rotate an object, I just noticed right after I finished a very nice wind sock (Git yur mind outta the gutter!! I mean those flag things that indicate wind at every airport ever)..
You can check it out here: https://www.roblox.com/games/910859815/Airfield
..Anyway, Ive gotten myself this far, but I can't seem to rotate a model {before you say "you cant rotate a model.." iKnowYouCanOnlyRotateParts} I need this pole to rotate so that the wind sock can change direction, but on top of that, there are models within the model, I have no clue how to effectively get those children.
Diagram:
Game
-Workspace -Model -Model Within - Parts... - Parts... -Parts
rotation=true
parts=script.parent.Model:GetChildren()
for i=1,#parts do
if rotation==true then
parts[i].CFrame=CFrame.fromEulerAnglesXYZ(.1,0,0)*parts[i].CFrame
else
end
I've also tried simpler layouts:
v = script.Parent.Model:GetChildren()
while true do
v.CFrame = v.CFrame * CFrame.fromEulerAnglesXYZ(0.1,0,0)
wait()
end
For this one I get Errors:
21:18:38.264 - Workspace.WIND.Script:43: bad argument #1 to '?' (CFrame expected, got nil)
21:18:38.265 - Stack Begin
21:18:38.266 - Script 'Workspace.WIND.Script', Line 43
21:18:38.267 - Stack End
Seems to be a basic idea for a script, how would any of you do it?
-Thanks
G7

4 comments
Each model should have a primary part set which you can use the functions in the model to get and set the CFrame, this change will apply to all parts of the model.
I don't know what that means,,, sounds like you're telling me to rotate a "base part" of the model. One that i'd need to set,, but that would just rotate that one brick. Thanks
Why don't you just Union the parts, and then rotate it?
the models work by scripts "bending" ropes I doubt it would work if I used a union.