# RaycastResult.getHarvestable

Returns the [Harvestable](../Game-Script-Environment/Userdata/Harvestable.md) hit during the raycast. This is only possible if [RaycastResult.type](../Game-Script-Environment/Userdata/RaycastResult.md#type) is equal to "harvestable", otherwise this will return nil.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
raycastResult:getHarvestable(  )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/RaycastResult.md#getharvestable)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `raycastResult` | [RaycastResult](../Game-Script-Environment/Userdata/RaycastResult.md) | The raycast result. |

**Returns:**

| Type | Description |
| --- | --- |
| [Harvestable](../Game-Script-Environment/Userdata/Harvestable.md) | The harvestable target. |
