Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to save a variable to a player?

I want to save the variable sentenceTime to a player, and have the variable stay with the player, even if they leave the game or respawn.

How it is being used is when they are arrested, they get their time in seconds, and each second it goes down by one, and their time saves, whether they leave the game or die. How would I do this?

1 comment

1 answer

✓ Accepted answer

You would not be able to save a variable from a script, you would need to create a folder or model and store strings inside of them. Then you start a save script. I suggest you read this;

http://wiki.roblox.com/index.php?title=Saving_Player_Data

or even on this website right now;

https://scriptinghelpers.org/guides/saving-and-loading-data-with-datastores

This is not a request site and probably no one would write and entire script for you. We help you learn.

If you have any other questions comment, otherwise accept answer and upvote please

This discussion is preserved as it was. New answers, comments, and votes are closed.