# sm.creation.importFromFile

Imports blueprint json file to world.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.creation.importFromFile(
    world,
    pathString,
    worldPosition?,
    worldRotation?,
    importTransforms?,
    indestructible?
)
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.creation.md#importfromfile)

**Availability:** Server only

> **Warning:**
> If the blueprint was not exported with transforms the importer will treat it as if importTransforms was disabled.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `world` | [World](../Game-Script-Environment/Userdata/World.md) | The world to import to. |
| `pathString` | string | The blueprint path. |
| `worldPosition` *(optional)* | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | World position of import. If importTransforms is enabled position is applied to the imported transform. (Defaults to vec3.zero().) |
| `worldRotation` *(optional)* | [Quat](../Game-Script-Environment/Userdata/Quat.md) | World rotation of import. If importTransforms is enabled rotation is applied to the imported transform. (Defaults to quat.identity().) |
| `importTransforms` *(optional)* | boolean | Import world transforms from bodies. (Defaults to false.) |
| `indestructible` *(optional)* | boolean | (DEPRECATED) Ignored, use setDestructable(false) on each body in creation. (Defaults to false) |

**Returns:**

| Type | Description |
| --- | --- |
| table | The table \{[Body](../Game-Script-Environment/Userdata/Body.md), ...\} of bodies created from the blueprint. |
