So I want to know if you can do this, lt will help me a lot. Will something like this work?
local list = {"A", "B", "C", "..."}
local value = Instance.new("IntValue")
value.Value = list
print(value.Value[1])
So I want to know if you can do this, lt will help me a lot. Will something like this work?
local list = {"A", "B", "C", "..."}
local value = Instance.new("IntValue")
value.Value = list
print(value.Value[1])
No. As the name suggests, it only accepts an int value. One way you could make a table and store it in the explorer could be creating a folder with the name of the table, looping through the table, and creating the appropriate value to the type of the table member. You can find the type of a variable using type(foo) for built-ins (string, int, bool, etc.) and typeof(bar) for those exclusive to rbx.lua
An IntValue explicitly takes a number in it's value, you can't put a table in it like that. Int stands for Integer which basically means a number without decimals.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Exactly. You could use a folder with int values in it however it can be easily manipulated client-side. There must be other ways to achieve what you're looking for, i'd just stick to tables and not actual instances to store values.
You can put the length of the table or a single value from the table or a concatenation of all values inside the table (Int's)