Can I change the whole rotation of a model because I have to go to every part in the model and rotate it
COMMUNITY QUESTION
Can I change the whole rotation of a model without going to all the parts?
2 answers
Using Primary parts and SetPrimaryPartCFrame you can rotate a whole model.
Remember to set the property "Primary Part" in the model to any part to rotate around.
local model = workspace.Model -- set
model:SetPrimaryPartCFrame(CFrame.new(model.PrimaryPart.Position)*CFrame.Angles(0,90,0)) -- change the angle...
You could always tween models.. Here is tunicus's snippet
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new()
local function tweenModel(model, CF)
local CFrameValue = Instance.new("CFrameValue")
CFrameValue.Value = model:GetPrimaryPartCFrame()
CFrameValue:GetPropertyChangedSignal("Value"):Connect(function()
model:SetPrimaryPartCFrame(CFrameValue.Value)
end)
local tween = tweenService:Create(CFrameValue, info, {Value = CF})
tween:Play()
tween.Completed:Connect(function()
CFrameValue:Destroy()
end)
end
Anywho, if this helps, accept the answer
5 comments
0
oop- as soon as I make a small answer lol
0
winky face ;)
0
Nice answer :)
0
I found something on reddit saying to rotate the handle. I will ask a question on that
0
Thanks Jesse, alright king
Just do SetPrimaryPartCFrame(). Really easy to do and just does the job.
local model = workspace.Model
model:SetPrimaryPartCFrame(--//Position Here\\--)
If you want to learn more, I suggest you go to this link: https://developer.roblox.com/en-us/api-reference/function/Model/SetPrimaryPartCFrame
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
By using script
add a primary part to the model then use SetPrimaryPartCFrame()
How do I do that?
ill make an answer