# Set variable

> Store a value in a variable.

Source: https://docs.buildcord.dev/nodes/variables-and-data/set-variable/

`data.set` stores a value in one of your [variables](https://docs.buildcord.dev/concepts/data#variables).

## Settings

| Setting | What it does |
| --- | --- |
| Variable | The variable to change. |
| Value | What to store, such as `{option.value}`. Accepts tokens. |

## Ways out

`out`. Turn on **If it fails** for a red way out.

## Notes

- The variable's scope decides whose value changes: the bot's, the server's, the member's or the user's.
- Read it back as `{var.name}`.
- The canvas shows `{var.name} = value`.

## Example

Store `{option.channel}` in a server variable named `logChannel` so other flows can post there.

## Related

- [Change a number](https://docs.buildcord.dev/nodes/variables-and-data/change-number)
- [Delete variable](https://docs.buildcord.dev/nodes/variables-and-data/delete-variable)
