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

How to store many values in a StringValue ?

I've tried stocking many values that i could read one by one into a StringValue. It didnt work so i don't know how to do it. Here's what i've tried :

-- The script that creates the value
local value = Instance.new("StringValue", game.Workspace)
value.Name = "TestValue"
value.Value = {"value1", "value2", "value3"}

-- A different script that is supposed to read the values
local value = game.Workspace.TestValue
for i=1,3 do
	print(value.Value[i])
end

1 answer

✓ Accepted answer

There is no way to do that, use more stringvalues. One stringvalue, one value.. Or if you still want to do that with one stringvalue, read about string.gsub

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