Author Topic: Variables Not Saving When I Die?  (Read 276 times)

Recently, some of the variables for my RPG haven't been saving when I die.

For example, I have a chest that gives you a key when you open it, and adds variable Key 1.
If the player has 1 Key, the chest won't open.
But it doesn't save whenever I die? What can I do to make it save when I do die, if not leave the server?

Because when a PLAYER dies, the PLAYER is deleted including ALL of it's variables.
A new PLAYER is then created.

If you want to have the same effect but having it keep it when a player dies, set it to CLIENT.
A CLIENT is only deleted when the CLIENT leaves the server, then they lose ALL variables.
A new CLIENT will only be created when they rejoin.

PLAYER = on the player until death
CLIENT = on the player untill left