I need to move a model to a certain position and make the model’s rotation to be aimed towards the part that the model needs to rotate to and move to it.
I recommend setting the PrimaryPart value on the model, and then using :SetPrimaryPartCFrame() on the model.
For example:
local Model = game:GetService("Workspace").Model
local NewCFrame = CFrame.new(5, 5, 5) --You can also add rotation
Model:SetPrimaryPartCFrame(NewCFrame)
I have a question. If I use the function you provided, will it rotate all parts in the model to the direction i need?
Setting the PrimaryPartCFrame will turn and should move all objects in the model if that answers your question.
1 Like