Sending a stringvalue (name and value) through a table

Im trying to send a table from the server to the client, with the name of the stringvalue and also its value so that on the client it can take these and search for its corresponding label inside a gui like this:


(with clientitem being the stringvalue

This is my current script:


Which returns this error: “attempting to concatenate string with table”

Ive also tried doing table.insert for the item name and value but that also led to an error.

Any help is appreciated

What line is that error on?

(don’t mind this)

the print line

characterssssssss

when using tostring it then prints this:
image
which is not quite what the value or name of the items are
image

You can’t print out a table by just putting it there because tables and strings are different data types.

If you want to loop through a table and print each object, do this:

for i,v in ipairs(Inventory1Owned) do
    warn(v:GetFullName())
end
1 Like

Yep so ive removed that and added the print onto the client instead which works and shows
image
which is exactly what im after, but im not sure how to go about looping through the table now on the client and searching for the matching names and value in the gui

Ive tried this on the client:
image
But it doesnt print anything

solved it with it:
image