✓ Accepted answer
There are different ways of setting the positioning of a BasePart. The most common and useful way is to use .CFrame.
Trying to set the Vector3 of a part would error, because BasePart's don't have a Vector3 property.
You can check the properties of a BasePart here.
Parts, MeshParts, Unions, and basically anything with a hitbox is a BasePart
Using .Positon
When you set the .Position property of a BasePart, it sets the center of the part to the position specified, unless this would cause parts of the BasePart to be inside of other BaseParts, causing collision overlaps, in which case the part will be placed upwards along the Y axis until there are no longer overlaps.
This means sometimes when setting the position of a BasePart, that part won't be placed where you want it to be placed. This can sometimes be useful if you don't want the BasePart to be played inside another part.
Using .CFrame
Using CFrame is the way I'd recommend not knowing the situation, as it's generally the right choice. CFrame will place the BasePart inside other objects even if there are collisions.
CFrame is not just the position, but also the orientation of a BasePart. CFrames can be complicated for some people, but because we're not talking about the rotation of the BasePart, it's pretty east to understand.
local part;
part.CFrame = CFrame.new(x, y, z)
This causes the orientation of the part to be 0, 0, 0
If you have any more questions, feel free to ask.
5 comments
part.Vector3? Use CFrame
I don't even know if some of these methods are valid.
Or if there are way better methods.
thonk
use CFrame