# Sandbox.Model.GetAttachment

## Overload 1

```csharp
System.Nullable<Transform> GetAttachment(string name)
```

> **Obsolete.**

Retrieves attachment transform based on given attachment name.

### Parameters

- `name` (`string`): Name of the attachment to retrieve transform of.

### Returns

`System.Nullable<Transform>`: The attachment transform, or null if attachment by given name is not found.

## Overload 2

```csharp
System.Nullable<Transform> GetAttachment(int index)
```

> **Obsolete.**

Retrieves attachment transform based on given attachment index.

### Parameters

- `index` (`int`): >Index of the attachment to look up, starting at 0.

### Returns

`System.Nullable<Transform>`: The attachment transform.

### Exceptions

- `System.ArgumentOutOfRangeException`: Thrown when given index exceeds range of [0,AttachmentCount-1]

Declared in [Sandbox.Model](/api/Sandbox.Model).
Assembly: `Sandbox.Engine`.
