# studio-variable-scope

> A variable is read without its owner, or with an owner it does not have.

| | |
| --- | --- |
| Kind | Studio problem |
| Reported by | Studio validation: the Problems panel, Play, Publish and the MCP `validate` tool |
| Code in the Studio | `variable-scope` |

Game variables have one value, written `score`. Player variables have one value per player, written `player.score`. Object variables belong to an object, written `object.health`.

## Fix

- Write `player.<name>` for a player variable, `<object>.<name>` for an object variable, and the bare name for a game variable.

## See also

- [Problems and validation](/studio/playtesting)
