So I learned about Model:SetPrimaryPartCFrame() and I have questions about using it. The way im it in a script is like this:
local Model = script.Parent Model:SetPrimaryPartCFrame(Model:GetPrimaryPartCFrame() * CFrame.new(0,0,0))
But I was wondering, how do you directly SET the position and orientation? This script just moves the part but how would I move it to a position and set its orientation?
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)) --[[ would turn it 90 degrees ]]
:SetPrimaryPartCFrame() is equivalent to setting the CFrame of a part like so:
part.CFrame = CFrame.new()
The difference is that it does it to whatever the primary part of the model happens to be.
I think what you're asking for is how you can change positions and orientations of parts, and this is where CFrames come in. To put it simply, CFrames are information on the position and orientation of parts. You can get a part's position, orientation etc. as well as do math with them, with the help of CFrames.
They do require a bit of math knowledge, but the basics should be relativity easy to understand. Here is the API reference for CFrames that I would suggest to take a look at: https://developer.roblox.com/en-us/api-reference/datatype/CFrame