Is there an alternative for a table when storing a lot of values?

So, I’m in need of a table which I imagine may end up with having hundreds of items that I will add myself, however, what would be the best way to approach this? So far, the best option I’ve seen is just using a table but I’m not entirely sure that would be the most effective option.

This is what I’ve got so far

local WordArray = {"player", "nine", "four", "fourty", "book", "now"}

Something such as this, but I plan on having a lot more items. Would this be the best way to do it?

1 Like

I would say a table is the way to go. I can’t think of another method that would be “shorter”.

1 Like

A table is the best way to store a lot of data. What I can recommend is that if there’s some pattern in what you’re adding to the table then maybe you could try to make an algorithm the uses this pattern to add data to the table. Otherwise you’ll just have to hardcode it.

You can use a dictionary, like

local WordArray = {
Word1 = "hello!",
Word2= "bye boomer",
}

And you can also
with HttpService:JSONEncode() your data before saving it, and when calling it, JSOnDecode, to not bypass the max characters of datastore which is I think like… 200000 characters.