PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

TranslateBy

Shifts a Model by the given Vector3 offset, preserving the Model's orientation. If another BasePart or Terrain already exists at the new position then the Model will overlap said object.

The translation is applied in world space rather than object space, meaning even if the model’s parts are orientated differently it will still move along the standard axis.

Parameters

Name Type Default Description

The DataType/Vector3 to translate the Model by,

Returns

Return Type Summary

Code Samples


Model TranslateBy

This sample demonstrates how Model:TranslateBy ignores collisions and respects the orientation of the model.

A simple two part Model is created, rotated 45 degrees on the Y axis, and its PrimaryPart is set. An large obstruction part is placed next to it.

After 5 seconds Model:TranslateBy is used to direct the model to move inside the obstruction part. The model will move inside of the obstruction and maintain it’s current orientation.