Ad
Log in to vote
3

How to rotate a model? [closed]

Asked by
MunimR 125
7 years ago

How to rotate a model, right now checking all children of a model and rotating each part doesn't work since if the part is already facing a different direction then it will awkwardly rotate it against the other parts. Any solutions?

Locked by JesseSong

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
17
Answered by
Quenty 226 Moderation Voter
7 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.
local function TransformModel(objects, center, new)
    -- Transforms a group of bricks (objects) relative to center to the new CFrame (new).  

    for _,object in pairs(objects) do
        -- if object:IsA("BasePart") then
        object.CFrame = new:toWorldSpace(center:toObjectSpace(object.CFrame))
        -- end
    end
end

From qCFrame

0
I don't understand why this works. Can someone help me? theevanegps2 15 — 4y
Ad
Log in to vote
0
Answered by 5 years ago

Holding CTRL/Shift + Clicking will let you select multiple parts or models. Using the Rotate tool, you can move all the selected parts or models at the same time.

If you want to rotate a part/model and have the part/model partially inside another part/model, turn Collisions off by going to Model > Click Collisions, then rotate the part. You may need to set the Brick setting to Off or 1/5 for more precise rotation.