Is there a performance difference between StringValues and IntValues?

As I’m trying to make a centralized and optimized pet system, I’ve reached a part where I need a way to save data about pets players own, and to read said data in ModuleScripts for example.

I plan on having different categories of pets, that boost speed, damage, etc, and I am indecisive on saving this category as an integer found in an IntValue which corresponds to a category, or just save it as a StringValue with the name of the category.

Any thoughts?

The performance difference would be negligible. What is different however is the structure for the save data, so the only reason I see for using integers is that it would take up less characters.

1 Like

I havent tried this yet, but maybe you can put the Data to a table, then using HttpService create a json and save this as a string in the datastore. For loading it, just reverse these steps and then you should have your data. Im not sure if it works, but its worth trying.

1 Like