# Variables and scope

> Global and local variables in LSL, and which parts of a script can see them.

:::caution[Stub]
This documentation page is a stub and is currently under development.
:::

This page will cover declaring variables, the difference between global variables (declared before the states) and local ones, and scope: as the wiki notes for user-defined functions, "Only global variables and the function parameters are visible; any local variables from where the function was called from are not directly available."

- [Types](/fundamentals/types/) and the [type reference](/types/)
- [User-defined functions](/fundamentals/functions/#user-defined-functions)
- [`llResetScript`](/functions/llResetScript/), which sets every global variable back to its default

*The quotation is from the Second Life Wiki page [Category:LSL User-Defined Functions](https://wiki.secondlife.com/wiki/Category:LSL_User-Defined_Functions), by Second Life Wiki contributors, under [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/).*

---

From lsl.dev: https://lsl.dev/fundamentals/variables/
