Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

I want to use a string to store values in a table,but i'm not sure how to use it. Anyone help? [closed]

Asked by 6 years ago

This question already has an answer here:

Decoding a string into a table with multiple data types?

Since there is no TableValue objects in Roblox, i decided to use StringValues to store multiple values of a table so i can use it later. Here is an example:

function convert(t)
    local string=t[1]..','
    for i=2,#t-1 do
        string=string..t[i]..','
    end
    string=string..t[#t]
    return string
end

knifes=convert({1,3,4,5,8})

Here's the trouble: I don't know how to convert the string into a table again. I can't use tonumber function because it will return nil...

0
+1 to omit moderation rep loss Goulstem 8144 — 6y

Marked as Duplicate by Goulstem

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?