Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Rotating model script problem?

Asked by 10 years ago

I am working on a CFraming script that will rotate a model, but it is not working very swell (Rotate, but go away from each other).


model = game.Workspace.Model children = model:GetChildren() for i = 1, #children do local CFPos = children[i].Position --gets current position of each block children[i].CFrame = CFrame.new(CFPos) *CFrame.Angles(0,0,.5) -- keeps block in position and rotates end
0
Captain you can't rotate the model you are rotating the parts in the model. Hybric 271 — 10y

1 answer

Log in to vote
0
Answered by
2eggnog 981 Moderation Voter
10 years ago

After setting a primary part for the model, using the SetPrimaryPartCFrame method will move and rotate all the other parts along with it.

Ad

Answer this question