# DataStoreSetOptions

DataStoreSetOptions : `Instance`

## Overview

An object used to specify additional information (metadata) when using the GlobalDataStore:SetAsync() method.

## Properties

## Methods

### GetMetadata

Returns additional information (metadata) of a specific object.

#### Parameters

#### Return

| `Dictionary` | Additional information (metadata) in the form of key-value. |
| ------------ | ----------------------------------------------------------- |

#### Code Samples

```lua
local options = Instance.new("DataStoreSetOptions")
options:SetMetadata(
{
    Reason = "DailyMission"
})
			
print(options:GetMetadata())
```

### SetMetadata

Registers additional data (metadata) to be stored together when using the GlobalDataStore:SetAsync() method.

#### Parameters

| `Dictionary` InMetaDataTable | Additional information (metadata) in which several properties are specified in the form of key-value. |
| ---------------------------- | ----------------------------------------------------------------------------------------------------- |

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

```lua
local DataStoreService = game:GetService("DataStoreService") 
local GoldStore = DataStoreService:GetDataStore("PlayerGold") 

local success, errorMessageOrLoadValue = pcall(function()
    local userIds = nil
    local options = Instance.new("DataStoreSetOptions")
    options:SetMetadata(
    {
        Reason = "DailyMission"
    })
			
    GoldStore:SetAsync(player.UserId, 100, userIds, options) 
end)
```

## Events
