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

Can the SaveNumber method save "0"?

I've been working on this prison system and use Data Persistence to save the amount of seconds they still have left. I've noticed when the value is 0, it prints 'save', but when I load it after rejoining, it appears it never saved at all. First script is the Saving one; Second is loading.

*Script Removed

3 comments

1

It should be able to save 0. How are you testing this? In an actual published place? Are you sure pris.value is actually being changed how you think it is? (Maybe that should be part of your print statement)

0

BlueTaslem, I had the same problem at one of my Training Facilities saving Promotion Points, and I had to save the number as -1 then have the script recognize it as 0 when a person entered.

0

@Blue and M3, Thanks for input.

1 answer

✓ Accepted answer

I am assuming ROBLOX just wants to save data and Data Persistence requests by doing this, but they don't save the number 0. The best thing you could probably do is save the number as a -1 and when the player rejoins have the script load their jail time as 0 seconds.

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