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

Does Anyone know if I can rotate a model?

I have multiple parts that are in 1 model. Here is the model-

- model
	Script
	(24 part after the script)

Here is the script

local part = game.Workspace.model.Chandelierpart4
while wait(.1) do
	part.CFrame = part.CFrame * CFrame.Angles(math.rad(5), 1,0)
end

If a weld can use this script for rotation, then that would be a huge help. If so, Can you help me by giving a visual of how to weld these parts. Please and thank you. I use codeshare.io so If you would like to do that to help with a visual, then simply message me :)

Thank you,

Sammy52520

:)

2 answers

Personally, I set a Primary Part for the model. Then, to move/rotate/etc the model, I use SetPrimaryPartCFrame

game.Workspace.WhereverYourModelIs.Model:SetPrimaryPartCFrame(blah blah)

This moves the whole model relative to the primary part.

5 comments

0

That is good advice. However I was hoping to move the whole model around the same point

0

I actually found a more creative Idea on the design of the model that will allow this I am now testing

0

Yay! Glad I was helpful :)

0

Sorry I have been looking for a solution and for what I was told, it will not be as simple. You can't have :SetPrimaryPartCFrame as a part of the variable so I'll not only help myself, I will help for everybody

0

Why are you trying to move a part through a variable? Or am I misunderstanding you? Also, please mark this as answered if this was sufficient. :)

Maybe this is wrong but

while wait(.1) do

Might not work. What i would personally use would be:

while true do
wait(.1)
---and so on

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