Collapse Sidebar


Sets the BasePart/CFrame of the Model's Model/PrimaryPart. All other parts in the model will also be moved and will maintain their orientation and offset respective to the Model/PrimaryPart.

Note, this function will throw an error if no Model/PrimaryPart exists for the model. This can cause issues if, for example, the primary part was never set or has been destroyed. Therefore, it is recommended the developer check the Model/PrimaryPart exists before using this function. For example:

if model.PrimaryPart then

A common use for this is for the ‘teleportation’ of player characters to different positions.


Name Type Default Description

The DataType/CFrame to be set.


Return Type Summary

Code Samples


In this code sample a Model is created with a simple arrangement of Parts. The PrimaryPart of this Model is then set, meaning Model:SetPrimaryPartCFrame can then be used.

To demonstrate SetPrimaryPartCFrame, a simple loop is then run which switches the model between two CFrames every second.

Character SetPrimaryPartCFrame

In this sample every Player character Model added will be moved to 0, 500, 0 three seconds after spawning.