Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to rotate a model?

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?

2 answers

✓ Accepted 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

1 comment

0

I don't understand why this works. Can someone help me?

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.